Jump to content
Sign in to follow this  
support@dir

problem with Authorized.net

Recommended Posts

Can somebody help me? The transactions are posting in Authorize.net. They are submitted. Unfortunately, the OSCommerce template does not acknowledge credit card payment and I show nothing in the OSC Admin Panel of a confirmed order. I get the following error: "Your credit card could not be authorized for this reason. Please correct any information and try again or contact us for further assistance."

 

Checkout shipping page passes fine.

Checkout payment page passes fine.

Checkout confirmation pages does not pass and produces the above error.

 

 

I do have cURL in PHP, I do have an account with Authorize.net, Direct response is delimited response "no", Default Field Separator "comma", Field Encapsulation Char "blank". Transaction Key must be working properly since transactions are posting. Transaction version is 3.1. Site is not in the "catalog" directory but in the main root. Padlocks/ ssl seem to be appearing in the right places (i.e. login page, checkout, and credit card pages, etc.).

 

URL is: https://www.directelectronics2u.com/checkout_payment.php

Domain Name: www.directelectronics2u.com

 

Configure files are:

 

define('HTTP_SERVER', 'http://www.directelectronics2u.com'); - should not be empty for productive servers

define('HTTPS_SERVER', 'https://www.directelectronics2u.com'); - should not be empty for productive servers

define('ENABLE_SSL', true); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'www.directelectronics2u.com');

define('HTTPS_COOKIE_DOMAIN', 'www.directelectronics2u.com');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_WS_IMAGES', 'images/');

 

 

Do you know why I'm not reaching the checkout success page? I keep getting sent back to the checkout payment page with the above error? I really dont know what it could be. Please help, I've almost ripped out all my hair.

 

Thanks,

Share this post


Link to post
Share on other sites

Hello,

 

If you can find these two lines in your code:

 

$this->response = explode('|', $response);

 

// If the response code is not 1 (approved) then redirect back to the payment page with the appropriate error message

if ($this->response[0] != '1') {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode($this->response[3]) . ' - ' . urlencode(MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_DECLINED_MESSAGE), 'SSL', true, false));

}

}

 

 

Change them to this:

 

$this->response = explode(',', $response);

 

// If the response code is not 1 (approved) then redirect back to the payment page with the appropriate error message

if ($this->response[0] <> '1') {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode($this->response[3]) . ' - ' . urlencode(MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_DECLINED_MESSAGE), 'SSL', true, false));

}

}

 

Notice explode('|', $response); CHANGED TO explode(',', $response); AND

if ($this->response[0] != '1') { CHANGED TO if ($this->response[0] <> '1') {

 

When Authorize.net sends back there response, it's comma delimited not pipe.

 

The != doesn't seem to function correctly on some servers.

 

Hope this help.

 

Enjoy,

 

RookuhShay

Share this post


Link to post
Share on other sites
Hello,

 

If you can find these two lines in your code:

 

$this->response = explode('|', $response);

 

// If the response code is not 1 (approved) then redirect back to the payment page with the appropriate error message

if ($this->response[0] != '1') {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode($this->response[3]) . ' - ' . urlencode(MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_DECLINED_MESSAGE), 'SSL', true, false));

}

}

 

 

Change them to this:

 

$this->response = explode(',', $response);

 

// If the response code is not 1 (approved) then redirect back to the payment page with the appropriate error message

if ($this->response[0] <> '1') {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode($this->response[3]) . ' - ' . urlencode(MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_DECLINED_MESSAGE), 'SSL', true, false));

}

}

 

Notice explode('|', $response); CHANGED TO explode(',', $response); AND

if ($this->response[0] != '1') { CHANGED TO if ($this->response[0] <> '1') {

 

When Authorize.net sends back there response, it's comma delimited not pipe.

 

The != doesn't seem to function correctly on some servers.

 

Hope this help.

 

Enjoy,

 

RookuhShay

 

 

thank you ill give r a try

Share this post


Link to post
Share on other sites

Did this code change work for you? I looks like you are using AIM, not SIM- is that correct? Which file did you make this change to?

Thanks.

I'm struggling with a similar- not same- error.

Share this post


Link to post
Share on other sites
Did this code change work for you? I looks like you are using AIM, not SIM- is that correct? Which file did you make this change to?

Thanks.

I'm struggling with a similar- not same- error.

 

The file in which the suggested changes need to be made is authorizenet_aim.php .

 

It is located in the /catalog/include/modules/payment folder. (the "catalog" folder may be named "oscommerce" on some installations.

 

This file is included in the "contribution" file "AuthorizeNet_AIM_10-24-08.zip" which can be downloaded from the contributions section here.

 

- Roger

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×