Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

problem with Authorized.net


Guest

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,

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...