Zen Cart Logo
Forums / Bug Reports / [Done v1.3.8] Authorize.net Bug in 1.37?

[Done v1.3.8] Authorize.net Bug in 1.37?

Locked

Views: 1,700

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
17 Aug 2007, 12:55 AM
#1
phnord avatar

phnord

New Zenner

Join Date:
Aug 2007
Posts:
3
Plugin Contributions:
0

[Done v1.3.8] Authorize.net Bug in 1.37?

Anyone having a problem with the Zen Cart incorrectly processing the response string from Authorize.net in 1.37? I am having a problem when a user submits a final order, Authorize.net correctly processes the credit however, Zen Cart seems to be dispalying the response incorrectly. This is what is outputted after a CC is processed.

"(TESTMODE) This transaction has been approved.| - Your credit card could not be authorized for this reason. Please correct any information and try again or contact us for further assistance."

... And then it kicks the user back to step to enter a credit card number. (The transaction was processed successfully by Authorize.net)

Any thoughts??

I am using the latest ZC version.

17 Aug 2007, 2:01 AM
#2
phnord avatar

phnord

New Zenner

Join Date:
Aug 2007
Posts:
3
Plugin Contributions:
0

Re: [Done v1.3.8] Authorize.net Bug in 1.37?

Ok, solved the problem. In authorizenet_aim.php, it seems to be comparing $x_response_code != '1'. However, when outputting the value of $x_response_code (which contains the response code from Authorize.net's response string) it turned out that the variable $x_response_code is set to "|1|".

So here is my fix:

Replace:

$x_response_code = str_replace("|","",$x_response_code);

// If the response code is not 1 (approved) then redirect back to the payment page with the appropriate error message
if($x_response_code != '1') {
 ...etc, etc

with:

$mod_x_response_code = str_replace("|","",$x_response_code);

// If the response code is not 1 (approved) then redirect back to the payment page with the appropriate error message
if($mod_x_response_code != '1') {
 ...etc, etc
17 Aug 2007, 2:14 AM
#3
drbyte avatar

drbyte

Sensei

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

Re: [Done v1.3.8] Authorize.net Bug in 1.37?

The delimiters appear to be the cause.
An updated authorize.net module was posted in January to handle non-standard delimiters more effectively.
http://www.zen-cart.com/forum/showpost.php?p=310464#post310464

.
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.

17 Aug 2007, 2:17 AM
#4
phnord avatar

phnord

New Zenner

Join Date:
Aug 2007
Posts:
3
Plugin Contributions:
0

Re: [Done v1.3.8] Authorize.net Bug in 1.37?

Yup, the delimiters are the issue. Just was going through to find more. Thanks for the heads up on the updated file.

17 Aug 2007, 4:40 AM
#5
drbyte avatar

drbyte

Sensei

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

Re: [Done v1.3.8] Authorize.net Bug in 1.37?

A more recent update was also posted here:
http://www.zen-cart.com/forum/showthread.php?p=354897#post354897

.
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.