Subject: | Pre-authorization & Capture/completion |
We have enhanced Business::OnlinePayment::eSelectPlus for
pre-authorization & capture/completion. We hope this enhancement can be
incorporated or adapted for BOP::eSelectPlus on CPAN.
0.05 2011-09-20
- Pre-auth & capture/completion are now supported.
Backwards-compatibility note: callers who specify the order_id,
should now specify it with 'order_id' in content (not
'order_number',
which is now used for eSelectPlus txn_number, for capture).
Note: the order_number() method now returns the 'TransID'
(not 'ReferenceNum') response field from eSelectPlus.
Note: testing preauth seems to work only with test store #1 (CAD).
- by Randall Whitman <www.whizman.com> on contract to
DonorWare LLC dba donor.com <cpan @ donor . com>.
Developer believes the following entry is incorrect in Moneris
documentation eSELECTplus_Perl_IG Appendix B. Definitions of Response
Fields (in both US/CA):
Txn_number
Per testing, there is never a "Txn_number" response element present, but
rather "TransID". Also, in mpgClasses.pl (the gateway-interaction code
on which the doc examples are based), the getTxnNumber() method gets the
value from the TransID element in the response.
The eSelectPlus order_id required parameter, can either be passed by the
caller to B:OP, or generated within B:OP eSelectPlus. Examples
respectively: t/capture_ca.t & t/capture_us.t .
As of version 0.05, the content method now uses a gateway-specific
'order_id'
(not 'order_num') parameter for caller-specified eSelectPlus order_id,
and the
'order_number' parameter is now used as the transaction number (eSelectPlus
txn_number, from TransID) for Post Authorization (completion/capture). Also
for Post Authorization, the 'order_id' parameter must match the order_id
used for the corresponding Authorization Only (pre-authorization).
Existing (0.03):
- pre-auth & capture/completion not supported
- for purchase/normal-sale, the eSelectPlus order_id required parameter,
could be passed in as content{order-number}, else was generated
inside B:OP eSelectPlus (generate_order_id). (eSelectPlus ReceiptId
response, same value as order_id, not returned by any B:OP accessor.)
- eSelectPlus ReferenceNum response, returned by B:OP order_number().
- eSelectPlus TransID response, missing from Moneris eSelectPlus docs
(cf Txn_number - which in fact is never present in the response),
not returned by any B:OP accessor.
New:
- pre-auth/capture is supported
- for pre-auth as well as for purchase/normal-sale, the eSelectPlus
order_id
required parameter, can be passed in as content{order_id}, else is
generated inside B:OP eSelectPlus (generate_order_id).
eSelectPlus ReceiptId response, equivalent to passed-in/generated
order_id,
returned by gateway-specific B:OP accessor order_id().
- eSelectPlus ReferenceNum response, not returned by any B:OP accessor.
- eSelectPlus TransID response, which is returned by standard B:OP accessor
order_number(), is the value needed for capture/completion, as B:OP
content{order_number}, which is mapped to eSelectPlus txn_number.
(See t/capture*.t for sample.)
Alternate (not implemented):
- map content{order-number} to order-id, as done in B:OP eSelectPlus 0.03,
so that would be done for capture/pre-auth as well as purchase.
- pass the B:OP order_number() [eSelectPlus TransID] (not BOP
authorization())
from pre-auth, as content{authorization} [map to eSelectPlus txn_number]
(not content{order_number}.
~ various other permutations of method and content-key nomenclature.
====
Gateway Pre-auth (or sale) Component Capture/void - B:OP
response B:OP accessor originating
%content{order_number}
AuthorizeNet:
Response index BOP return/method Origin/desc Use for
capture/void
5 authorization approval code no
7 order_number gateway xn id yes: x_Trans_ID
PayflowPro:
Response key BOP return/method Origin/desc Use for
capture/void
AUTHCODE authorization auth code no
PNREF order_number yes: ORIGID
EXact <https://rt.cpan.org/Public/Bug/Display.html?id=70658>:
Response tag BOP return/method Origin/desc Use for
capture/void
Authorization_Num authorization bank auth # Yes!:
Authorization_Num
SequenceNo order_number gateway xn id no
eSelectPlus (new/0.05):
Response tag BOP return/method Origin/desc Use for
capture/void
AuthCode authorization auth code no
TransID order_number gateway Txn yes: txn_number
ReferenceNum usused (no accessor) gateway refnum not usable
ReceiptId order_id content{order_id}| also: order_id
generate_order_id
(n.b. additional gateway-specific order_id, to originate in B:OP or caller)
(existing eSelectPlus 0.03):
Response tag BOP return/method Origin/desc No capture
AuthCode authorization auth code not usable
TransID unused (not in doc) gateway Txn not supported
ReferenceNum order_number gateway refnum not usable
ReceiptId none (no accessor) content{order_number}| needed
generate_order_id
(n.b. additional gateway-specific order_id, to originate in B:OP or caller)
====
The eSelectPlus test server seems to go down intermittently.
When the eSelectPlus test server is up, the B:OP eSelectPlus tests pass.
Attached Business-OnlinePayment-eSelectPlus-0.05.tar.gz contains the new
test
scripts for pre-auth & capture, but also contains customizations
(internally numbered 0.04). Attached preauth-capture.patch.gz contains only
changes made for pre-auth & capture, and only changed files, not the new
ones.
% sha1sum Business-OnlinePayment-eSelectPlus-0.05.tar.gz
01a8d8659242f82d412dba319526f69b95173c28
Business-OnlinePayment-eSelectPlus-0.05.tar.gz
% gzip preauth-capture.patch
% md5sum Business-OnlinePayment-eSelectPlus-0.05.tar.gz
preauth-capture.patch.gz
fc2d941130751da32dd5021428ac381d
Business-OnlinePayment-eSelectPlus-0.05.tar.gz
101c8812bdbe8170cd59cd4fc127ef88 preauth-capture.patch.gz
Subject: | preauth-capture.patch.gz |
Message body not shown because it is not plain text.
Subject: | Business-OnlinePayment-eSelectPlus-0.05.tar.gz |
Message body not shown because it is not plain text.