Showing results for 
Search instead for 
Did you mean: 

One instance of relay response (SIM) works perfectly, while the other fails

Hello All,


I am having a problem integrating an online payment utilizing relay response. This problem is especially perplexing, as we have one instance working properly, and one is not - on the same web site. I've brought this to customer support, and after validating all of their credentials on using this type of system.  They simply told me they can't help me and pointed me here. So, I'm hoping that someone has had a similar problem, and can guide me in the right direction.


For the one that works, we have the following code setup on the entry button:


<form name="AuthForm" method="post" action="" id="AuthForm">
<input type='hidden' name="x_relay_response" value="true" />
<input type='hidden' name="x_relay_url" value="VALID RETURN URL" />


I've omitted hidden fields that aren't relevant, of course. This system works as expected. After a credit card payment is entered, the user is redirected back to the response page, where our script processes the payment information as needed.

We are trying to create a second access point to the hosted payment form. We're using the same transaction key, account, and even the same scripting to create the form. Here is what's passed:


<form name="AuthForm" method="post" action="" id="AuthForm">
<input type='hidden' name="x_relay_response" value="true" />
<input type='hidden' name="x_relay_url" value="SECOND VALID URL" />


Once the user clicks the button, they are, as expected, taken to the hosted payment form. However, once the payment is entered, the user is presented with this information:


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


After some research, and communication with support, it looked as if this error was due to not being able to communicate with the response page. That perhaps there were errors on the page, or it wasn't accessable at all. To simplify testing, we created a response page that was a simple "Thank You". The new page clearly loaded correctly, and simply displays the message. Now, the payment is processed correctly, but the consumer sees this message, and of course any processing that needs to happen on the response page will not happen.


Again, what's perplexing is that the first instance using relay response ALWAYS works, and the second one ALWAYS does not. They both use the same account, and utilize the same web hosting account. I've even tried using different programming languages - all with the same result. All return URLs areI am at a loss as to how to proceed. Any assistance you could provide would help tremendously.


If the first url always, work and the second always fail. There is something different about the second url.

How about delete any code for the second url, then make a copy of the first one and rename it to the second.


Thanks for the reply, but it's a fully valid URL.  I didn't post it for security reasons, but it's simply a page that writes "Thank You". Instantly accessible, and no issues whatsoever.

Can you post the relay response page and code. When you said fully valid URL,it that mean it can access from outside without any issue(SSL, etc)?




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">


<html xmlns="">





Thank You



Look like you are using


test code

string post_string = "test=xyz";
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create("");
objRequest.Method = "POST";
objRequest.ContentLength = post_string.Length;
objRequest.ContentType = "application/x-www-form-urlencoded";

// post data is sent as a stream
StreamWriter myWriter = new StreamWriter(objRequest.GetRequestStream());

// returned values are returned as a stream, then read into a string
string post_response;
HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
using (StreamReader responseStream = new StreamReader(objResponse.GetResponseStream()))
	post_response = responseStream.ReadToEnd();

 Getting Error 405 - The remote server returned an error: (405) Method Not Allowed.


If you are using, might need to set

<asp:Page EnableViewStateMac="False" />