[Interchange-bugs] [Bug 156] New - Cannot handle authorize.net "special" transactions (AUTH_ONLY and PRIOR_AUTH_CAPTURE)
bugzilla-daemon@localhost.akopia.com
bugzilla-daemon@localhost.akopia.com
Fri, 23 Mar 2001 18:25:52 -0500
http://developer.akopia.com/bugs/show_bug.cgi?id=156
*** shadow/156 Fri Mar 23 18:25:52 2001
--- shadow/156.tmp.19738 Fri Mar 23 18:25:52 2001
***************
*** 0 ****
--- 1,88 ----
+ Bug#: 156
+ Product: Interchange
+ Version: 4.6.3
+ Platform: All
+ OS/Version: All
+ Status: NEW
+ Resolution:
+ Severity: blocker
+ Priority: P2
+ Component: Core
+ AssignedTo: mike@minivend.com
+ ReportedBy: nferrari@ccsc.com
+ URL: N/A
+ Cc:
+ Summary: Cannot handle authorize.net "special" transactions (AUTH_ONLY and PRIOR_AUTH_CAPTURE)
+
+ In authorize.net, VOID and PRIOR_AUTH_CAPTURE need the field x_Trans_ID and
+ CAPTURE_ONLY needs x_Auth_Code (according to Authorize.net documentation). These
+ fields are not sent by globalsub/authorizenet.
+
+ What I changed to allow these transactions to go through is:
+
+ =======
+ globalsub/authorizenet:
+
+ line 27 (documentation, item 2), added:
+
+ Variable MV_PAYMENT_REMAP order_id=mv_order_id auth_code=mv_auth_code
+
+ -----
+ line 82, replaced:
+
+ $actual{cyber_mode} = 'AUTH_CAPTURE'
+ unless $actual{cyber_mode};
+
+ with:
+
+ # Using mv_payment_mode for compatibility with older versions, probably not
+ necessary.
+ $actual{cyber_mode} ||= $actual{mv_payment_mode} || 'AUTH_CAPTURE';
+
+ -----
+ line 89 (definition of hash %type_map), added:
+
+ AUTH_ONLY => 'AUTH_ONLY',
+
+ -----
+ line 128 (definition of hash %query), replaced:
+
+ x_Type => $actual{mv_payment_mode},
+
+ with:
+
+ x_Type => $actual{cyber_mode},
+
+ -----
+ line 134 (definition of hash %query), added:
+
+ x_Trans_ID => $actual{order_id},
+ x_Auth_Code => $actual{auth_code},
+
+ -----
+
+ line 195 (inside "if ($response_code == 1) {"), replaced:
+
+ $result{'order-id'} = 1; # ? Why this this set to 1? -mark
+
+ with:
+
+ # order-id and auth_code are set to 0 if Authorize.net in test mode.
+ # Order.pm interprets order-id == 0 as authorization error.
+ $result{'order-id'} = $trans_id || 1;
+ $result{'auth_code'} = $auth_code;
+
+ ================
+
+ catalog.cfg:
+ -----
+
+ added:
+
+ Variable MV_PAYMENT_REMAP order_id=mv_order_id auth_code=mv_auth_code
+
+ ================
+
+ Of course, the line numbers above are not 100% exact, since I first changed
+ things and then wrote this bug report. But at least they will point you to the
+ aproximate line...