Paypal - automatic redirection after successful payment?

I want to redirect the visitor automatically after a successful payment. There are two options at Paypal, and I'm confused.

The first (in the edit section of the Buy Now button)

enter image description here

Second (in profile> my tools for sale)

enter image description here

But in the second you can choose only 1 URL, and this will be for all purchase buttons. It will not be good. What is the right way to do this?

+6
source share
3 answers

To perform an automatic return, you first need to enable "Automatic Return" in your PayPal profile, and you can specify any return URL. Now, if you have a multiple return URL, then you should specify the return URL in the button code in the "Accept my client to this URL when they complete the check" section. That way, it will always override the return URL that you specified in your PayPal profile.

+10
source

Well, you can either configure it for the entire account or for each button: in fact, you can do the same thing - have a standard default account and selective redefinition for the selected buttons. There is a third way: define the return_url variable in the POST data for the button yourself: this is a different override for each button.

What you use is up to you.

+1
source

Set up automatic returns using PayPal

To set up automatic return:

  • Log in to PayPal and click on "Profile."
  • Click the "Website Payment Settings" link in the "Sales Settings" section.
  • Press the "On" button to enable automatic return. Enter the return URL.

Note. To set up automatic returns, you need to meet the requirements for the return URL. Learn more about return URL.

Sender URL with multiple return URL: if you use a different URL for success / failure

It will automatically rewrite the specified PayPal URL.

+1
source

Source: https://habr.com/ru/post/975246/


All Articles