cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

relay_response not working

I have a test account and am trying to use the relay_response feature. It works with my production account. I consistently get the message that the transaction was successful, but there was a problem with my web site. I've tried using my real URL and https://developer.authorize.net/tools/paramdump/.

 

Is there somewhere in the UI I can authorize an URL for my test account?

tthomas48
Member
Member
65 REPLIES 65

Lookup in my database caused my delay to greater > 10. All good now.

Hi,

 

I am using SIM method

I am directing to custom receipt page using x_relay_url.

 

I get the following message:

 

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

I am using test credit card number 4222222222222   w/ exp fo 0612 and amount of 2.00 to generate declined transaction. I get this in test environment and live environment (in test mode).

 

I have read many posts reguarding similar situations, but no clear resolution. I was using an aspx page as the relay response. Is it valid to use an aspx page as my relay url? (I notice most developers appear to use php).

I tried placing a basic html page as the relay response and I get the same result.

I've read where this is a timeout issue but I get this response immediately, less than a second.

Any help would be appreciated.

 

John

Unless I am mistaken the only way to get a decline is to be running in a live environment. Test mode and the development server always return approved for successful transactions or errors if you made an incorrect API call. Verify you are indeed in test mode or using the development server.


-------------------------------------------------------------------------------------------------------------------------------------------
John Conde :: Certified Authorize.Net Developer (Brainyminds) :: Official Authorize.Net Blogger

NEW! Handling Authorize.Net's Webhooks with PHP

Integrate Every Authorize.Net JSON API with One PHP Class (Sample code included)

Tutorials for integrating Authorize.Net with PHP: AIM, ARB, CIM, Silent Post
All About Authorize.Net's Silent Post

OK - here is what I am doing. Correct me if I am testing wrong.

 

I am testing on the development server. ( https://test.authorize.net/gateway/transact.dll )

 

The payment form comes up fine.  I thought from documentation that you could test certain response reason codes by placing in the code as the amount - Ex: 1.00 for reason 1, 5.00 for reason 5, etc. if you use 4222222222222 as the credit card number. It appears that when the response reason code is 5 (5.00 in amount) or above (not all tested), the form reloads itself with a red error at the top corresponding to the text of the error.  If I use response reason code 1 (1.00 amount) which means "This transaction has been approved", I get the following page from the existing development server: (this response comes immediately - I've read about 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 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.

 

I also get the same message for response reason codes 2-4 except they say that the transaction is declined which corresponds to the reason text. However, in every case I thought it was suppose to load the relay url which it never seems to do. I have also tested this same scenario on the live server in test mode and the results are identical. I am doing something wrong?

 

Also, can the relay response url be an aspx page? I see mostly php in the forum.

Just a side note: The web site is hosted by an external hosting company. I've read some documentation concerning the relay url being on port 80. I assume it is but I am checking with host company.

 

Thanks for your help.

I just read the SIM guide and it seems that it does have its own set of rules for testing an integration.Hopefully an Authnet moderator can shed morelight on this for you.

 

You can use aspx pages for your relay response URL. Any valid URL will suffice as long as it is on port 80 or 443 (that port is not documented since most people use SIM only because they don't have an SSL certificate installed). You see PHP used more commonly because it is a more popular web programming language particularly amongst newer developers.


-------------------------------------------------------------------------------------------------------------------------------------------
John Conde :: Certified Authorize.Net Developer (Brainyminds) :: Official Authorize.Net Blogger

NEW! Handling Authorize.Net's Webhooks with PHP

Integrate Every Authorize.Net JSON API with One PHP Class (Sample code included)

Tutorials for integrating Authorize.Net with PHP: AIM, ARB, CIM, Silent Post
All About Authorize.Net's Silent Post

OK - I do not understand something. I placed a straight IP address that is open, public access and open to port 80. Shouldn't the page from this url show in the relay response. I have tried with and without setting the relay response in the merchant interface in conjunction with and without sending x_relay_url with the payment form call but I still get the error I alluded to earlier. This does not appear to be any timeout issue as the error comes back immediately, not after 10 seconds. It's as if there is no attempt at reaching the url in the relay response. I also tried silent post with no success. Has anybody had issues with goDaddy hostting and authorize.net? I have seen other posts similar to mine with no real resoltion. Anybody???

 

John

Is there any reason why you are using an IP address and not your domain name?


-------------------------------------------------------------------------------------------------------------------------------------------
John Conde :: Certified Authorize.Net Developer (Brainyminds) :: Official Authorize.Net Blogger

NEW! Handling Authorize.Net's Webhooks with PHP

Integrate Every Authorize.Net JSON API with One PHP Class (Sample code included)

Tutorials for integrating Authorize.Net with PHP: AIM, ARB, CIM, Silent Post
All About Authorize.Net's Silent Post

It was just a test to see if the page would be reached. It resides on server outside of GoDaddy. I read a few things about GoDaddy and a guy I work with said to try and point to his server and he gave me the IP. Does relay response only accept domain names?

OK - I scrapped plans to use an aspx page for the relay response. No matter what I tried I would get the same error stated ealier. I would even get the same error with an html page. I went to a classic asp page like Authorize.net provides in their example code and I got this to work. Authorize.net is pretty good on example code for everything but relay receipt. I was told that aspx or html would work for relay receipts. Now - moving on...

When I attempt to make a database call from relay receipt, I AM BACK TO THE SAME EROR. Does anybody have example code on making a database call from the relay receipt. Is it even legal to do so? If I seem to deviate even slightly from the example code for relay receipt, it errors out. How do people update the database based on the relay response code returned? If anybody has example code for relay response with database update, I would appreciate it.

 

John

Database access should not affect relay response since all it is actually doing is sending the results of the transaction to a page specified by you. If the relay response is generating an error then the script handling the response contains an error that is preventing your server from responding properly to the relay response. This includes the page taking longer then 10 seconds to respond to the relay response.


-------------------------------------------------------------------------------------------------------------------------------------------
John Conde :: Certified Authorize.Net Developer (Brainyminds) :: Official Authorize.Net Blogger

NEW! Handling Authorize.Net's Webhooks with PHP

Integrate Every Authorize.Net JSON API with One PHP Class (Sample code included)

Tutorials for integrating Authorize.Net with PHP: AIM, ARB, CIM, Silent Post
All About Authorize.Net's Silent Post