Showing results for 
Search instead for 
Did you mean: 

Ruby 15 Mins Sample Code doesn't work???

Hi all,


I am a totally new one to authorize. I carefully followed the 15 minutes Step by Step guide to deploy the sample code of Direct Post Method. However every time I just meet 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 approved. (Or anything else)


I read some threads in this forum, but right now I still fail to find out the reason. Because I totally follow the guide. This is the link:

My ruby version is 1.8.7, rails' is 3.2.1.

I really appreciate any suggestion and idea!!! Thank you very much in advance!




Accepted Solutions

Get a hosting account somewhere and use an developer account in live mode. I'm sure you can afford the $8 or so it will probably cost you for a month of hosting.

View solution in original post

A fake post is just a html page with a <form /> and post to your relay response page with the SIM response data.

View solution in original post


Did you configure the relay response page URL in your control panel? Is the page reachable over the Internet? Does it have SSL, and if so, is it self-signed or from a major issuer?


Hi TJPride,


Thank you so very much for your reply! I think right now probably the problem comes from relay response page URL. So If possible, could you please left some code hint. To be honest, I am very new in Authorize payment, also in Rails config. Thank you again!



Ruby is a little confusing to me, I'm used to PHP. All I know is that one of the major things you need to have with DPM is the URL of your relay response page configured in the control panel. With PHP, the relay response URL is passed from the order form as a hidden variable - what's the URL of your order form?

The related variables are as followings.


<input id="x_relay_response" name="x_relay_response" type="hidden" value="TRUE">

<input id="x_relay_url" name="x_relay_url" type="hidden" value="http://localhost:3000/relay_response">


Thank you for your reply!



Relay Response Basics and Troubleshooting


your x_relay_url is not access outside of you pc.

Hi RaynorC1emen7, thanks a lot for your reply! So should I provide a static URL or IP address to test this sample application according to the blog?



An url that is accessible by the internet. And also remember to add it to the valid relay response url list on the merchant account.

Thank you, RaynorC1emen7! It is helpful. I will apply for one accessible url for final productiion. But right now I need to build a dev environment on my local machine to build the whole website, so I need to check the every page I need. So is there any way to deal with this issue? Right now the project is built in webrick with port 3000.



Since required access to the relay response page from the web. The best you can do is a fake post(with the SIM post response) to your relay response page for testing.