Volatil3
Volatil3

Reputation: 14978

php: Unable to return to my site after Paypal payment

First I created test accounts for sandbox which were generated as following by Paypal:

1- [email protected] 2- [email protected] 2- [email protected]

Now I turned Auto Return to ON on my MAIN account I am using for Paypal that is [email protected]. My form looks like:

<form action='https://www.sandbox.paypal.com/cgi-bin/webscr' method='post' id="frmPayPal" name='frmPayPal'>
            <input type='hidden' name='business' value='[email protected]'>
            <input type='hidden' name='cmd' value='_xclick'>

            <input type='hidden' name='item_name' value='Awesome Stuff'>
            <input type='hidden' name='item_number' value='0002'>
            <input type='hidden' name='amount' value='0.99'>
            <input type='hidden' name='no_shipping' value='1'>
            <input type='hidden' name='currency_code' value='USD'>
            <input type='hidden' name='handling' value='0'>
            <input type="hidden" name="rm" value="2">
            <input type='hidden' name='return_method' value='2' />
            <input type='hidden' name='cancel_return' value='http://296c6e7b.ngrok.io/clients/ryan/pay.php'>
            <input type='hidden' name='return' value='http://296c6e7b.ngrok.io/clients/ryan/pay.php'>
            <img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
        </form>

Now I can make successful purchase but it does not return to the URL.

I am submitting form via jQuery

Upvotes: 1

Views: 72

Answers (1)

Wassapaks
Wassapaks

Reputation: 435

You need to login your [email protected] and enable the Auto Return for Website Payments just like how you did in your [email protected].

How i figured it out? because of this:

<input type='hidden' name='business' value='[email protected]'>

Upvotes: 1

Related Questions