I have enabled auto-return after a paypal customer purchase in the sandbox paypal settings. I have also specified a return url in the settings e.g. www.example.com
because it was compulsory. However, I want the return URL to be dynamically set in the payment button e.g.
<form name="_xclick" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="company@life.com">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="item_name" value="Enquiry Estimate">
<input type="hidden" name="amount" value="250">
<input type="hidden" name="return" value="http://example.com/order/success?order=1654321">
<input type="hidden" name="notify_url" value="">
<input type="submit" value="Accept and Pay Now" />
</form>
The auto return url when the user pays with this particular button should be
http://example.com/order/success?order=1654321
instead of just example.com
Why is the URL not being overridden? Whenever a payment is made, Paypal is redirecting to example.com
only.