Showing results for 
Search instead for 
Did you mean: 

Automatic page redirection after successful order

I have successfully implement SIM. After successful order execution, It shows link on receipt page to go back to our main site. At our main site, there is code to process order and send confirmation emails. The problem is that some time user click on the link 'click here to go back to our site' and sometime they don't. What I want is to implement some automatic redirection to our website after an order has been executed


It's not silly as you are, after all, sending the user away from your website. Any time you do that you lose an amount of control by definition. The inability to set cookies or use sessions are other examples of this.

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

    I want when the user confirm the order through the user redirect to my site simple HTML base welcome page
    which is done with relay response, but the url are still of authrize, and also the menu links on welcome page not linking correctly.

   This is done with paypal easly but i not know how to do it as rely response not do what i need.


 Hope to help.

You should display a link on your Relay URL to allow the end-user to return to your site. It will not be done automatically using SIM. You need to provide them a method to return on the page.


Thank you,



Trusted Contributor
Trusted Contributor

Hi i have developed a simple solution for the problem you described, please take a look and if there is any problem of security or something else

please also mention it. i did it in such a way that user come on, and in relay response he give a url to confirm page which have onload submit

form whcih the user will redirect to the page he mention.


$url = "";
$html .= '<html>
           <body onload="javascript&colon;document.confirm.submit();">';

$html .= "<FORM name='confirm' id='confirm' method='post' action='$url' >";
$html .= "    <INPUT type='hidden' name='first_name' value='".$_POST['x_first_name']."' />";  
$html .= "    <INPUT type='hidden' name='username'   value='".$_POST['x_user_name']."' />";

$html .= "</FORM>";

echo $html;


 after clicking on submit payment the user will be redirect to the page above which was mention in relay response,

 and onloading this page it will be redirect to welcome page on your site with your site url.


Hope this will healp.


Unfortunately, I'm not clear as to what you are doing. You have said in your most recent post in this thread, that the user will click the submit payment buttong, which would mean that they were already on the Authorize.Net server, and then they would be re-directed to the page referenced in the code you've posted, which I believe you are saying is your Relay URL, and then upon the re-drect to your Relay URL, the end-user will be re-directed to a different page. This would not work because you cannot use automatic re-directs from your Relay URL. Do I have a clear understanding of your explanation?





Trusted Contributor
Trusted Contributor

why dont you try:


<meta http-equiv="refresh" content="1;url=<?=$_POST['x_first_name'?>&username=<?=$_POST['x_user_name']?>">

you would of course have to modify the welcome.php page to use the $_Get array rather than post.

Trusted Contributor

Hi Webware


Did you find a solution to the automatic page redirection issue?


I will be implementing SIM and it's essential to me that this can be done.





There is nothing in SIM that does it automatially, but you can always use some tricks to do it. Try using this method;


In the target file to which your relay url is directed.

First, store the response in DB / file from $_POST  variable(PHP).

Second. redirect to the same oage or anyother page.


Hope this helps .



Santosh Sahoo