Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Getting time out error 52 with SIM Authorize.net module


hammershell

Recommended Posts

Posted

Some of my costumers are getting a time-out error when clicking the submit button in the Authorize.net secure credit card page. this is using the Authorize.net SIM module that comes with Oscommerce 2.2. The transaction goes though to Authorize.net but I don't get an Oscommerce invoice and then they and I get an error notification email stating:

 

An error occurred while trying to report this transaction to the merchant. An email has been sent to the merchant informing them of the error. The following is a result of the attempt to charge your credit card.

 

At the Authorize.net Knowledge Base they give this info for error 52:

Resolving this Error:

 

• Before doing anything else, have your script start writing to your receipt page. For example: Print your page headers and the first part of the page body. If your script prints to the screen first we will recognize that you and your customer have received the transaction results.

 

• Check that your script permissions are correct and that it can accept an HTTPS POST.

 

• Check that the script is not completing other functions before writing to the screen such as writing to a database or sending emails.

 

• Please check to see if there are different processes that are used in your script for approvals, declines, or errors. Check each process to be sure that they will write to the screen before any other functions.

 

• Verify that your script is not using redirects upon receiving the response from our servers. Redirects are strongly discouraged because they can potentially interfere with the process.

 

On occasion, timeouts will occur that are outside of the control of your script or our servers. Typical reasons for these timeouts are poor Internet connectivity, overloaded or malfunctioning Internet routing issues. Depending upon your server location and what route is used to send data, it is possible that you may occasionally receive timeouts.

 

I tried setting my https timeout on my server to 3 minutes. (I am not using HTTPS in oscommerce though)

Here is the code that seems to be causing the delay issues in the Authorize.NET SIM file in the Oscommerce payment modules folder.

function before_process() {
     global $HTTP_POST_VARS, $order;

     $error = false;

     if ($HTTP_POST_VARS['x_response_code'] == '1') {
       if (tep_not_null(MODULE_PAYMENT_AUTHORIZENET_CC_SIM_MD5_HASH) && ($HTTP_POST_VARS['x_MD5_Hash'] != strtoupper(md5(MODULE_PAYMENT_AUTHORIZENET_CC_SIM_MD5_HASH . MODULE_PAYMENT_AUTHORIZENET_CC_SIM_LOGIN_ID . $HTTP_POST_VARS['x_trans_id'] . $this->format_raw($order->info['total']))))) {
         $error = 'verification';
       } elseif ($HTTP_POST_VARS['x_amount'] != $this->format_raw($order->info['total'])) {
         $error = 'verification';
       }
     } elseif ($HTTP_POST_VARS['x_response_code'] == '2') {
       $error = 'declined';
     } else {
       $error = 'general';
     }

     if ($error != false) {
       tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code . '&error=' . $error, 'SSL', true, false));
     }
   }

 

Maybe I should shut down the MD5 Hash cecking part since I dont uise it and also I might need to Print Headers here?

 

thanks

  • 4 weeks later...
Posted

You are not alone. I'm using oscommerce RC2 and I'm getting the SAME exact problem. I think its suppose to be a security feature that partially works right. I have a feeling it has to do with being timed out at the gateway page. If anyone has further investigation on the matter please post! Looking for a solution on this too!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...