Bring customer back to site after payment

DrMonster
Contributor
Contributor
I have the below being sent to PayPal's gateway for a customer to make a payment. This works but they don't return to the site. action="https://www.sandbox.paypal.com/cgi-bin/webscr" > <input type="hidden" name="cmd" value="_cart"/> <input type="hidden" name="business" value="name.domain.com"/> <input type="hidden" name="item_name_1" value="item"/> <input type="hidden" name="amount_1" value="17.00"/> <input type="hidden" name="quantity_1" value="1"/> <input type="hidden" name="upload" value="1"/> <input type="hidden" name="currency_code" value="GBP"/> <input type="hidden" name="rm" value="2"/> <input type="hidden" name="cancel_return" value="http://example.com/Cancel"/> <input type="hidden" name="shopping_url" value="http://example.com/shopwithus"/> <input type="hidden" name="notify_url" value="http://example.com/response/"/> <input type="hidden" name="no_shipping" value="1"/> <input type="hidden" name="lc" value="GB"/> <input type="hidden" name="image_url" value="http://example.com/pic.gif"/> <input type="hidden" name="no_note" value="1"/> <input type="hidden" name="invoice" value="ab12963257"/> What can I do to get them to return back to my site after a payment?
Login to Me Too
1 ACCEPTED SOLUTION

Accepted Solutions
Solved

MTS_Justin
Moderator
Moderator
Hello,

If your using a "saved" or "hosted" PayPal button you may have added the return URL within the options for the button.

Check for "saved" / "hosted" buttons within the sandbox account where the payment is being sent and check the settings for these buttons to determine if a return URL was specified.

https://www.sandbox.paypal.com/cgi-bin/customerprofileweb?cmd=_button-management

Was my post helpful? If so, please give me a kudos!

View solution in original post

Login to Me Too
3 REPLIES 3

MTS_Justin
Moderator
Moderator
Hello,

You need to do two things, specify a return URL and enable auto return within your account settings.

https://www.paypal.com/us/smarthelp/article/how-do-i-use-paypal's-auto-return-feature-to-redirect-cu...

Was my post helpful? If so, please give me a kudos!
Login to Me Too

DrMonster
Contributor
Contributor

Ok i did this but i have a strange issue. It seems to return me to a URL that i cant find anywhere on my account?

 

So i disabled Auto return and return URL to test but after a payment it takes me back to a URL that i must have set in the past somewhere.

 

Now i did have this working a few months ago and if i remember correctly I needed the return URL to contain parameters so i specified the value rm=2 but no matter what i do it takes me back to a test URL i must have set in the past.

 

Not sure if someone (you are listed as a moderator) can take a look at my account as i have tried switching all sorts off/on?

 

Oh i dont think its something ive set at my end as i replaced all values with unique values so i could see where i was going wrong but nothing is sent to PP to redirect back to this test URL.

Login to Me Too
Solved

MTS_Justin
Moderator
Moderator
Hello,

If your using a "saved" or "hosted" PayPal button you may have added the return URL within the options for the button.

Check for "saved" / "hosted" buttons within the sandbox account where the payment is being sent and check the settings for these buttons to determine if a return URL was specified.

https://www.sandbox.paypal.com/cgi-bin/customerprofileweb?cmd=_button-management

Was my post helpful? If so, please give me a kudos!
Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.