cancel
Showing results for 
Search instead for 
Did you mean: 

Relay response instantly times out with Direct Posting Method

Hi all,

I've got a problem getting my sandbox merchant account to complete a transaction from our Java application.

Our app reads various user information, collects it into a form, and posts to the testing address at https://test.authorize.net/gateway/transact.dll , where the user sees a credit card payment page. With the correct API logins, SHA2 hash etc. these steps don't seem to be the problem.

The problem occurs the moment the user hits the submit button on the credit card payment form.

We tend to get 2 versions of the response, one saying:

"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."

While the other being more direct saying that our script timed out.

In the merchant email, the errors were all "timed out".

But to me the error occurred instantly. There was no time in between hitting the submit form button and the error message.

I have since looked around this forum for similar problems but none of them seem to be exactly like mine.

I have checked out the article about basic trouble shooting of relay responses at https://community.developer.cybersource.com/t5/The-authorize-net-Developer-Blog/Relay-Response-Basic... and can confirm:

  1. the x_relay_url is spelt correctly in the data we submitted to the "transact.dll" page;
  2. The x_relay_url is exposed to the public internet. By default when a GET request hits it, it just displays the current time with a message saying that yes this path is exposed to the Authorize.net server. When a POST request comes in, it then attempts to get the request parameters and further process them. 
  3. A special setup: in the testing, our product by default runs on http on port 9xxx. Users normally access it by putting in localhost:9xxx/(whatever path) to access different parts of it. I used the service of Ngrok to build an HTTP tunnel so there is a port forwarding arrangement between the port 80 of the Ngrok host somewhere on the AWS and the http port 9xxx of my localhost. The Ngrok's host name is publicly discoverable. A user can reach my localhost:9xxx by just putting in "http://{Ngrok host address}".
  4. For Authorize.net postback, a servlet is listening on a path something like "/gateway/authorize-net". The full address of "http://{Ngrok Host}/gateway/authorize-net" is publicly accessible. By hitting the URL in the browser (GET), it shows the current time.
  5. The tunnel is an HTTP to HTTP tunnel. The host on Ngrok in this situation is not running on port 443 therefore does not have certificate problems.
  6. In the sandbox account's management UI, I have added this particular full address mentioned in step 4 as the default relay response URL, under the Response/Receipt URLs section.

I need to improve and test some features of our product for some customers using the Authorize.net services. As mentioned before, right now I'm using a sandbox account and posting the details to https://test.authorize.net/gateway/transact.dll, with x_relay_response: TRUE, x_relay_URL: filled in and publicly accessible.

Appreciate any help.


 

leomy
Member
0 REPLIES 0