Forums / Bug Reports / [Done v1.5.5] Authorize.net AIM Helf for Review by Merchant

[Done v1.5.5] Authorize.net AIM Helf for Review by Merchant

Views: 1,174

Results 1 to 2 of 2
3 Mar 2016, 10:48 PM
#1
numinix avatar

numinix

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.

4 Mar 2016, 3:17 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: [Done v1.5.5] Authorize.net AIM Helf for Review by Merchant

Thanks. Most of this has already been reported and fixed in forum posts and committed into v155.

But the part about the extra string being added and blowing out the db storage (if db storage is even turned on) has not.

Will update v155 to prevent attempting to store the text comment in the bigint field.

Thanks!

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.