Showing results for 
Search instead for 
Did you mean: 

Relay response in PHP with SIM



First sorry for my bad english,


I have a problem with the SIM relay response, i have always this 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.


I have read 4-5 topic about this error, but nothing resolve this error.


What i have check :

- Relay URL the website is using (x_relay_url) <-- THIS is OK

- Confirm that you can load the Relay URL in a Web browser <-- THIS is OK

- can only use ports 80 and 443 for all Web traffic. <-- THIS is OK

- review the settings to ensure that the correct Relay Response URL is configured in your account <-- THIS is OK


The account is in test mode and this is my PHP code :

Payment Form :

<form method='post' action="">
        <input type='hidden' name='x_relay_response' value="true" />
        <input type='hidden' name='x_relay_url' value="" />
        <input type='hidden' name='x_relay_always' value="true" />



And my relay url is :

(you can check this url, the delay is verry good and all is OK)


Do you have an idea of what is the problem ?



Best Regards


Not sure if it make any different but I see that the page return just "ok" when I click on the link. It not a well format HTML page.


Thanks for your reply.


I have test with

(with html format page)


But this is still not ok.

Ok. Here is what I found. Note, I'm using

1)It error "The remote server returned an error: (403) Forbidden."

when doing a "POST" method WebRequest in code to . It work fine with "GET" and "PUT".

2)It will work with "POST" method if I add a UserAgent e.g. "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)".


Since the relay response use the "POST" method and I don't think will add a fake UserAgent. It might be setup change on your apache site.



But my hosting company prohibits access with blank UserAgent :smileyfrustrated:


I think i'm forced to use the AIM method.


Why send blank UserAgent -_- ?

You'd think the UserAgent would be set to something - but on the other hand it's a little silly to block access to blank UserAgents as well, considering they're set by the computer initiating contact and any hacker is going to take about 30 seconds to get around that problem. Any chance of your hoster changing the settings for you?

If you going to use AIM make sure they are PCI compliance for accepting CC info.PCI and You

They are not setting it to blank, they are just not faking it as a browser request.