Showing results for 
Search instead for 
Did you mean: 

Relay Response is not working

Hi friends

Am only a beginner with Authorise.NET. So for my application I was trying to use the SIM method. Code is in ASP.NET (VB).

It was working fine untill I included x_relay_response and x_relay_url. I created a simple no code page aspx page and had specified its live url as relay url. I tested that URL and its loading fine. There is no script or no code in it. Only a blank aspx page. But after specifying that as relay url after entering the credit card form and on submitting it shows an error


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.


So as a try I enabled tracing in web.config and after I opened the trace file. The result was interesting. posting all the values to the page as post reponse with transaction I, and the creditcard form details I entered. (That values in the post section of the trace.axd)


But why its showing an error and its not redirecting to that URL

Also my domain is in Cloud hosting (ixwebhosting).


Requesting your kind attention in this since am approaching a deadline..


Thanks in advance

Sandeep Thomas


For website set EnableViewStateMac="false" on both the submit(the post to and the relay response page.



Boss, I tried that way and it takes off that error.. But instead of that error its getting stay on this page

Its not getting redirected to the relay response URL i mentioned. ( I guess it will get redirect to that URL i mentioned as response url). I'm only some experience with Paypal processing. In that it will get redirect to the URL mentioned as Return URL.. is that similar to that?

Or do I need to do any code on that response URL to get redirected?


Thanks for your support


Ok. That how it suppose to work. It( relay the response from the URL you set.


The simple thing to do,

(c#)on the relay response URL page, on code behind save the response fields to the DB

string responseCode = Request.Form["x_response_code"];

Then on the page do a javascript redirect 

 String cstext1 = "<script type=\"text/javascript\">" +
            "window.location = \"" + yourDBKey +"\"</script>";
        RegisterStartupScript(csname1, cstext1);


to your receipt/confirmation page with a key(use the transactionID with authCode) from the DB insert. Then on your receipt/comfirmation page using that key to display the result.

Thanks friend for that code..

But that relay response meant to be automatically get redirected to the URL we specified as relay response URL.. isn't it? Even then why we need that script method in our page to get redirect that page? Actually that relay response URL I mentioned on the x_relay_URL is to where the page I want to get redirect after the Payment approval. It doesnt need to get redirect to anywhere from that page...

Yes and No. will call your relay response URL page and relay the response(like a proxy), that why you are seeing your page with in the URL. So if you want your URL on the address bar, do the javascript redirect. Or just leave it at