Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Auth.net SIM script timed out while trying to POST transaction results

Auth.net SIM script timed out while trying to POST transaction results

Locked

Views: 2,786

Results 1 to 19 of 19
This thread is locked. New replies are disabled.
11 Nov 2014, 10:09 PM
#1
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Auth.net SIM script timed out while trying to POST transaction results

Your script timed out while we were trying to post transaction results to it.

I sure could use some help correcting this problem
Tnx
Rick

SIM is functional in our sandbox and not functional on our live server. I've compared ZC admin settings in both. The only differences that I can find right now are in the server OS, php version and MySQL version and SSL. Both servers use same ZC versions and same plugins.

Sandbox server: Functional
Production server: Error Script timeout when "Pay Now" button on the Auth.net SIM Form is clicked
Auth.net approves the transaction but nothing happens on the zencart side other than SIM_Debug

ZenCart 1.5.3 both servers. Plugins identical both servers
authorizenet.php files identical on the 2 servers
ZenCart SIM settings identical on the 2 servers
Production VPS server SSL and enabled
Sandbox shared server No SSL

Both servers use the same Auth.net account credentials

Script causing error (I think)

[x_relay_url] => https://chainweavers.com/index.php?main_page=checkout_process&action=confirm

Sandbox server
php 5.3.28
MySQL 5.5.40-cll
Server OS Linux 2.6.32-531.17.1.lve1.2.57.el6.x86_64

Production server
php 5.4.31
MySQL 5.5.39-cll
Server OS Linux 2.6.18-274.7.1.el5

Link suggested earlier by DrByte
http://www.zen-cart.com/content.php?302-authorizenet-sim-an-error-occurred
There are several reasons for seeing this message:

**OK **1. Your site is too slow in responding to Authorize.net's attempt to return the customer to your site and/or send back transaction authorization to your site. Maximum 10 seconds is permitted. If your server is slower than 10 seconds when attempting to load a page, you have a more serious problem than merely handling payments. You need to resolve your server speed problem first. Start by talking to your hosting company, and/or consulting our FAQs on speed and performance.

OK 2. If your store is in Down For Maintenance mode, you cannot test SIM transactions.

OK 3. You have the Authorize.net server's IP address blocked in your store's server firewall or .htaccess rules. Consult your server's apache errorlog to find the IP address which is being repeatedly denied when payments are attempted, and unblock it.

BLANK 4. You may have entered invalid URLs into your Authorize.net "Relay Response URL" and/or "Receipt URL" settings. Ideally you should leave them blank and let your store send the proper values with your transactions, or if you are uncomfortable with that for some reason, set them to point to your index.php?main_page=checkout_process URL.

No Known or observed problems 5. You might have a problem caused by an invalid or improperly configured SSL certificate on your site. Thus, if Authorize.net is attempting to respond to your site and your site has problems in SSL mode, then Authorize.net will be encountering either an error message or delayed response, thus triggering symptoms similar to #1 above.
**
Don't use rewrite rules**
6. You might have invalid rewrite rules set as a result of creating or adding an .htaccess file to rewrite URLs as part of so-called "seo" addons, or installed such an addon. Many times such addons fail to properly handle all returning responses from external systems properly, resulting in serious system problems.

Configuration: Sessions: Identical both sites 7. If your site has a problem with sessions handling or cannot properly set a valid session cookie, you might have similar problems because the return response cannot be connected to the customer's original shopping session, and thus an error is returned, and thus Authorize.net doesn't see the expected "200" response code they want to see. (If they don't see a "200" response, they send the error message which is the topic of this article.)

11 Nov 2014, 11:18 PM
#2
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Auth.net SIM script timed out while trying to POST transaction results

When I said the authorizenet.php files were identical, I did not specify that the currency_code edits listed in this thread have been made on both servers.

13 Nov 2014, 7:27 PM
#3
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Auth.net SIM script timed out while trying to POST transaction results

Disabled SSL by changing all the https to http in both configure.php files. Changed all the SSL=true to false in both configure.php

Same result. Auth.net SIM approving the transaction but nothing happening within ZC. So the SSL in the live site vs no SSL in the test site doesn't appear to be the cause.

Server log for the only auth.net SIM response, but nothing happens within ZC

198.241.168.60 - - [13/Nov/2014:11:00:43 -0800] "POST /index.php?main_page=checkout_process&action=confirm HTTP/1.1" 302 208 "-" "-"

Looking @ server info differences between the two servers shows a few differences. The most significant (to me) is the test site has an entire section labeled SUHOSIN where the live server has nothing.

13 Nov 2014, 7:36 PM
#4
drbyte avatar

drbyte

Sensei

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

Re: Auth.net SIM script timed out while trying to POST transaction results

RixStix:

Configuration: Sessions: Identical both sites
Are you referring to Zen Cart (Admin->Configuration->Sessions) settings, or PHP (php.ini) settings?
If it's a sessions problem then it's most likely in php.ini

13 Nov 2014, 7:49 PM
#5
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Auth.net SIM script timed out while trying to POST transaction results

DrByte:

Are you referring to Zen Cart (Admin->Configuration->Sessions) settings,

Yes, that is where I looked to make that comment.

Host is moving everything to a 'newer' box in the next few days so I am hesitant to ask for changes right now, even if I had any idea of changes to make.

13 Nov 2014, 7:54 PM
#6
drbyte avatar

drbyte

Sensei

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

Re: Auth.net SIM script timed out while trying to POST transaction results

You could ask for a list of differences, or the php.ini from each server to compare them yourself

I'm also mindful that the presence of any myDebug-xxxx.logs in your /logs/ folder can be helpful in this situation.

13 Nov 2014, 8:34 PM
#7
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Auth.net SIM script timed out while trying to POST transaction results

DrByte:

I'm also mindful that the presence of any myDebug-xxxx.logs in your /logs/ folder can be helpful in this situation.

The only file there is SIM_myDebug-xxxx which contains the data sent to auth.net SIM to populate the form prior to clicking the "Pay Now" button on the auth.net SIM form.

Server log shows auth.net responding as indicated in post #3 above

13 Nov 2014, 8:38 PM
#8
drbyte avatar

drbyte

Sensei

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

Re: Auth.net SIM script timed out while trying to POST transaction results

Okay, so checkout_process is aborting. Otherwise the log file would also contain the response details.

When that's happening, the customer is seeing the browser do things. What are they seeing?
Obviously they see the authnet site before they click "Pay", and then later they eventually see something on your site. What's that? And, what are they seeing in-between, even if only for a nanosecond? (Maybe a screen recording might show the URL change a couple times before the screen redirects?)

Is the apache errorlog showing any 406 responses? or any other non-200 responses?

13 Nov 2014, 8:49 PM
#9
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Auth.net SIM script timed out while trying to POST transaction results

  1. Customer is sent to the Auth.net SIM payment form with their account details pre-populated so that they can input credit card #, exp date and CVV.
  2. Bottom of page has a "Pay Now" button.
  3. Click "Pay Now"
  4. Instantly, a generic auth.net white page with text
  5. Server log entry appears identical to post#3 above

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

This transaction has been approved.

It is advisable for you to contact the merchant to verify that you will
receive the product or service.

No links back to the ZC site. Just the sterile, white auth.net page

The payment is authorized and captured which can be seen within the auth.net account.

The email sent by auth.net to the merchant (me) is

Authorize.Net Merchant,

Your script timed out while we were trying to post transaction results to it.
Transaction ID: 6657207384
Transaction Result: This transaction has been approved.

The following message was displayed to the customer:

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

This transaction has been approved.

It is advisable for you to contact the merchant to verify that you will
receive the product or service.

13 Nov 2014, 10:41 PM
#10
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Auth.net SIM script timed out while trying to POST transaction results

Below is the screens received in a successful payment made on the test site
step 1 of 4 shipping

step 2 of 4 payment method

step 3 of 4 checkout confirmation
redirect to auth.net SIM form for payment details
PAY NOW button on SIM form

redirect white screen & mixed content screen (must acknowledge mixed content) using FireFox browser

[INDENT=2]This page will automatically redirect you back to ChainWeavers.com for your order confirmation
[/INDENT]
[INDENT=2]details
[/INDENT]
[INDENT=2]If you are not redirected within 5 seconds, please click the button below to continue
[/INDENT]
[INDENT=2]CONTINUE BUTTON.
[/INDENT]


[INDENT=2]Popup window on top of the above white screen.
[/INDENT]
[INDENT=2]Security warning
[/INDENT]
[INDENT=2]Although this page is encrypted, the information you have entered is to be sent over an unencripted connection and could easily be read by a third party.
[/INDENT]
[INDENT=2]Are you sure you want to continue sending this information?
[/INDENT]
[INDENT=2]CONTINUE CANCEL
[/INDENT]


step 4 of 4 ZC order confirmation screen

This is the order of screens on a** failed** payment transaction

  1. Checkout Step 1 of 4 shipping
  2. Checkout Step 2 of 4 payment method. Select Credit Card SIM method.
  3. Checkout Step 3 of 4 checkout confirmation. Confirm.
  4. Auth.net SIM payment form opens. https://secure.authorize.net/gateway/transact.dll
  5. Enter valid CC information.
  6. Click PAY NOW button.
  7. https://secure.authorize.net/gateway/transact.dll white, auth.net screen with customer message. transaction approved.[/FONT]
  8. Back button, to auth.net SIM payment form.
  9. Back button twice, document expired, reload. Checkout Step 3 of 4

Email received from auth.net showing payment details
========== MERCHANT DEFINED =========
securityToken : 573594402454131a474b64313c6596e5
zenid : b03737d35c3d8c4330608929ba6a72d3

zenid matches the zenid in the Checkout Step 3 of 4 checkout confirmation URL.
Not sure if security token is supposed to match anything.

[x_fp_hash] => sent to auth.net
Auth.net fingerprint troubleshooting generator matches [x_fp_hash] transmitted by ZC[/FONT]

14 Nov 2014, 12:11 AM
#11
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Auth.net SIM script timed out while trying to POST transaction results

Server log successful, test server transaction

198.241.168.60 - - [13/Nov/2014:14:31:47 -0800] "POST /ZEN153/index.php?main_page=checkout_process&action=confirm HTTP/1.1" 302- "-" "-"
198.241.168.60 - - [13/Nov/2014:14:31:48 -0800] "GET /ZEN153/index.php?main_page=checkout_success&action=confirm&zenid=549a33192447c5a4b58268c12181d57f HTTP/1.1" 200 1087 "-" "-"

Server log failed live server transaction

198.241.168.60 - - [13/Nov/2014:11:00:43 -0800] "POST /index.php?main_page=checkout_process&action=confirm HTTP/1.1" 302 208 "-" "-"

14 Nov 2014, 4:07 PM
#12
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Auth.net SIM script timed out while trying to POST transaction results

Looked at the SIM_mydebug files a bit closer and found that the data being sent to auth.net differs between the test and live site if that makes any difference.

The live site data sent to auth.net contains the zenID.
The test site data sent to auth.net does not contain the zenID

test site SIM debug
Sent TO auth.net

[x_relay_URL] => http:\chainweavers.TESTSITE/ZEN153/index.php?main_page=checkout_process&action=confirm

live site SIM debug
Sent TO auth.net

[x_relay_url] => https:\chainweavers.LIVESITE/index.php?main_page=checkout_process&action=confirm&zenid=b03737d35c3d8c4330608929ba6a72d3
(I changed forwardslash to backslash after https:)

14 Nov 2014, 5:04 PM
#13
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Auth.net SIM script timed out while trying to POST transaction results

That is not the issue :(

RixStix:

Looked at the SIM_mydebug files a bit closer and found that the data being sent to auth.net differs between the test and live site if that makes any difference.

The live site data sent to auth.net contains the zenID.
The test site data sent to auth.net does not contain the zenID

test site SIM debug
Sent TO auth.net

live site SIM debug
Sent TO auth.net

(I changed forwardslash to backslash after https:)

15 Nov 2014, 1:11 AM
#14
drbyte avatar

drbyte

Sensei

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

Re: Auth.net SIM script timed out while trying to POST transaction results

RixStix:

Server log successful, test server transaction

198.241.168.60 - - [13/Nov/2014:14:31:47 -0800] "POST /ZEN153/index.php?main_page=checkout_process&action=confirm HTTP/1.1" 302- "-" "-"
198.241.168.60 - - [13/Nov/2014:14:31:48 -0800] "GET /ZEN153/index.php?main_page=checkout_success&action=confirm&zenid=549a33192447c5a4b58268c12181d57f HTTP/1.1" 200 1087 "-" "-"

Server log failed live server transaction

198.241.168.60 - - [13/Nov/2014:11:00:43 -0800] "POST /index.php?main_page=checkout_process&action=confirm HTTP/1.1" 302 208 "-" "-"
Those 302 responses are not part of a default ZC install. Do you have a URL-rewriter intercepting the URLs?

Are the apache vhosts and all the .htaccess files identical between both servers?

15 Nov 2014, 2:58 AM
#15
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Auth.net SIM script timed out while trying to POST transaction results

DrByte:

Those 302 responses are not part of a default ZC install. Do you have a URL-rewriter intercepting the URLs?

No URL rewriter installed.

DrByte:

Are the apache vhosts

apache vhosts => Sorry, I do not understand the question.

DrByte:

and all the .htaccess files identical between both servers?
No they are not identical.
test site has no .htaccess in root
prod site has .htaccess in root. Most lines are blocking bad IP and bots. some carryover from previous zencart recommendations.

**Removed .htaccess and auth.net SIM completes transaction as expected. ** The line from the server log does contain 302

198.241.168.60 - - [14/Nov/2014:18:44:18 -0800] "POST /index.php?main_page=checkout_process&action=confirm&zenid=3ee5d47d6e3486a1e004e93ff23ee21a HTTP/1.1" 302 - "-" "-"

Thank you. Now to figure out the .htaccess but that should be an easy matter compared to getting here.

15 Nov 2014, 3:40 AM
#16
drbyte avatar

drbyte

Sensei

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

Re: Auth.net SIM script timed out while trying to POST transaction results

RixStix:

No they are not identical.
test site has no .htaccess in root
prod site has .htaccess in root. Most lines are blocking bad IP and bots. some carryover from previous zencart recommendations.

**Removed .htaccess and auth.net SIM completes transaction as expected. ** ...

Thank you. Now to figure out the .htaccess but that should be an easy matter compared to getting here.
I'd be very interested in knowing which statements in your .htaccess have caused this.

15 Nov 2014, 3:19 PM
#17
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Auth.net SIM script timed out while trying to POST transaction results

DrByte:

I'd be very interested in knowing which statements in your .htaccess have caused this.

Found it in the section for blocking "bad bots"
Amazing what can ultimately cause so much grief and troubleshooting; especially for non-coders.
Thank you again for pointing me in various directions to isolate the problem.

    RewriteCond %{HTTP_USER_AGENT} ^$ [NC,OR]
16 Nov 2014, 12:31 AM
#18
rixstix avatar

rixstix

Totally Zenned

Join Date:
Aug 2009
Location:
North Idaho, USA
Posts:
2,015
Plugin Contributions:
0

Re: Auth.net SIM script timed out while trying to POST transaction results

Sent a beverage or two of your choice.

Thank you again

16 Nov 2014, 6:48 PM
#19
drbyte avatar

drbyte

Sensei

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

Re: Auth.net SIM script timed out while trying to POST transaction results

Cheers. Glad it's finally sorted out!