Here's my script tag:
<script src="/data/js/paypal-button.min.js?merchant=MERCHANT_CODE"
data-button="subscribe"
data-name="Product - 1 Year Subscription"
data-amount="49.99"
data-recurrence="1"
data-period="Y"
data-callback="http://url"
data-cancel_return="http://url"
data-env="sandbox"
></script>
I don't know why and how I should properly do it but I tried with several of PayPal's data attributes like notify, return, return_url and more but nothing seems to work.
I pay and then get on this page:
But no redirect to the callback page, what am I doing wrong please?
Thanks and have a nice day!
Try this:
You have to enable Auto Return in your PayPal account. Otherwise it will ignore the
return
field.From the documentation:
IPN stands for Instant Payment Notification. It will give you more reliable/useful information than what you'll get from auto-return.
Here is the link to the documentation: https://www.paypal.com/cgi-bin/webscr?cmd=p/mer/express_return_summary-outside