Reply
Posts: 1,476
Topics: 33
Kudos: 33
Solutions: 126
Registered: ‎09-14-2009

Re: Automatic page redirection after successful order

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
Member
Posts: 2
Registered: ‎11-03-2010

Re: Automatic page redirection after successful order

Hey
    I want when the user confirm the order through authrize.net 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.

Trusted Contributor
Posts: 451
Registered: ‎08-21-2009

Re: Automatic page redirection after successful order

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,

 

Elaine

Member
Posts: 2
Registered: ‎11-03-2010

Re: Automatic page redirection after successful order

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 authrize.net, 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 = "http://yoursitename.com/welcome.php";
$html .= '<html>
          <head>
            </head>
           <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.

Trusted Contributor
Posts: 451
Registered: ‎08-21-2009

Re: Automatic page redirection after successful order

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?

 

Thanks,

 

Elaine

Trusted Contributor
Posts: 165
Registered: ‎06-30-2010

Re: Automatic page redirection after successful order

why dont you try:

 

<meta http-equiv="refresh" content="1;url=http://yoursitename.com/welcome.php?firstname=<?=$_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.

Member
Posts: 1
Registered: ‎01-14-2011

Re: Automatic page redirection after successful order

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.

 

Regards,

Allan

Highlighted
Member
Posts: 1
Registered: ‎11-17-2011

Re: Automatic page redirection after successful order

Hi,

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 .

 

Regards,

Santosh Sahoo

santosh.sahoo@afixi.com