Totally Zenned
- Join Date:
- Apr 2007
- Location:
- Vancouver, Canada
- Posts:
- 1,567
- Plugin Contributions:
- 58
[Done v1.5.5] Authorize.net AIM Helf for Review by Merchant
In authorizenet_aim.php if the $response_code = 4 the module sets an error message and denies the order even though the transaction has gone through successfully.
The fix is to replace line 428:
if ($response_code != '1') {
With:
if ($response_code != '1' && $response_code != '4') {
Additionally, the plugin adds some text to the transaction ID on line 414:
$this->transaction_id .= ' ***NOTE: Held for review by merchant.';
Unfortunately the column type is BINGINT(20) and will not accept this value causing a fatal error. Fixing the column type allows the logging function to work but the order will still fail due to the first bug described above.
The solution to the second issue is to change the line to read:
$this->transaction_comment = ' ***NOTE: Held for review by merchant.';
Then replace line 444:
$sql = $db->bindVars($sql, ':orderComments', 'Credit Card payment. AUTH: ' . $this->auth_code . '. TransID: ' . $this->transaction_id . '.', 'string');
With:
$sql = $db->bindVars($sql, ':orderComments', 'Credit Card payment. AUTH: ' . $this->auth_code . '. TransID: ' . $this->transaction_id . $this->transaction_comment . '.', 'string');
It might also be a good idea to change line 687 from:
$sql = $db->bindVars($sql, ':transID', $this->transaction_id, 'string');
to:
$sql = $db->bindVars($sql, ':transID', $this->transaction_id, 'integer');
This would at least stop any fatal errors.