I think I've read all the posts concerning this topic but I have not seen any concrete examples on how to prevent it, only general advise. Based on what I've read, I need to set up my response page to process as follows:
1. Get transaction response values
2. Initiate HTTP post to render the reponse form with a "Processing, please wait." message
3. Bind transaction response values to form
4. Configure and send emails
5. Write transaction response values to database
6. Finish form post.
Step 2 is obviously the key in preventing the timeout. I'm a C# developer who's never gotten around to learning AJAX but I suspect this step would involve some AJAX code. All the examples I've been able to find on the web and in an AJAX book I bought involve some user interaction to initiate the event that would present the "Processing..." message. For the relay response, I don't know how to go about this. I also am not sure how to finish the process with step 6. I'm not asking for detailed code to do this. I can probably figure that out myself. What I'm asking for is some detail on the process of doing what needs to be done in steps 2 & 6 (what objects/methods to use, etc.) Can anyone help? Surely, somone has done this. I'll certainly share my "timeout prevention" solution on this forum once I get it to work.
05-03-2011 07:43 PM
I forgot to mention, I'm using SIM. I should also mention I've been using my code to support an ecommerce site since January. The timeout issue doesn't happen a lot (1 in 20 transactions maybe) but it is a nuisance. I have to respond to customer questions everytime it happens.
05-03-2011 07:49 PM
Hi jasco,
If you are only seeing timeouts occur only every once in awhile it is unlikely to be due to the method you have used to integrate SIM. It is more than likely due to processes that are running on your server that are preventing your page from accepting the relay response within 10 seconds or factors related to your ISP, webhost or server load. The Authorize.Net online knowledgebase, located at http://www.authorize.net/support/knowledgebase/, has this to say about SIM timeouts:
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 a result of the attempt to charge your credit card.
Your script timed out while we were trying to post transaction results to it.Transaction ID: 9876543210Transaction Result: This transaction has been approved.
05-05-2011 04:53 PM
Elaine, I appreciate your lengthy response. I have researched this issue as thoroughly as I know how and have already read most all of what you had to say in documentation I’ve looked at and in the various posts on this subject in this forum. I should have made that clear in my original post.
I realize that the web hosting server may occasionally have issues that cause a relay response to timeout. But because I cannot stop the timeout email from going to the customer (because I want to receive a receipt myself), I end up having to reassure every customer who receives the timeout email (even though they received their receipt from Authorize.Net) that their transaction was successful.
The last paragraph of your reply gets to the heart of my inquiry. I don't have control over the server's occasional issues that cause a timeout but I can do something about the way my relay response page processes in order to mitigate the possibility of a timeout. If I can immediately send a response with a “processing, please wait” message and then perform the database writes I should be able to beat the 10 second clock unless the server is really having problems. I would be happy if this would cut down even a fourth of the timeouts.
I’ve seen that last paragraph stated many times in this forum but never with an example of how to do it. The best statement I’ve see concerning this says, “It is very important that something prints to the screen before any other process is started. If your script prints to the screen first, Authorize.Net will recognize that you are receiving the information. The most effective method would be to PRINT the headers, and a line of text such as "Processing, please wait."”
As I mentioned in my original post, AJAX might be a solution but I’m not real sure of how to code it. Your site has plenty of examples on everything else associated with processing a transaction but nothing about how to submit the relay response as described above. Surely someone on this forum knows how to do this. Considering the number of posts on this topic, it is certainly worth someone's effort to provide an example.
Jeff
05-05-2011 08:18 PM
I am also interested in a solution to this.
05-06-2011 02:08 PM
Hi Jeff,
We obviously don't have any examples of how to do this, but you're right, someone else may. I'd recommend subscribing to this topic so that you'll be alerted via email if anyone else from the community is able to respond with any feedback. To subscribe, click Topic Options at the top of this thread and then select Subscribe. You'll then receive an email once anyone replies to your post.
Thanks,
Michelle
Developer Community Manager
05-16-2011 02:29 PM