1

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.

emkay
  • 901
  • 2
  • 11
  • 29
  • it gets redirected to http://example.com/order/success?order=1654321 – Vimalnath Jan 31 '14 at 16:55
  • @Vimal I don't understand your comment. Do you mean you have tried the same and it worked for you? – emkay Feb 01 '14 at 10:33
  • yes, it works for me When I click Submit, it gets redirected to http://example.com/order/success?order=1654321&tx=75C00905T0249973P&st=Completed&amt=250%2e00&cc=GBP&cm=&item_number= – Vimalnath Feb 02 '14 at 07:08
  • @Vimal so it works with AUTO return too? Not just with the normal/manual return? – emkay Feb 03 '14 at 10:24
  • You can consider to use Chrome the Inspect Element to check whether your code is really state the correct return address. Will the page be cached and keep example.com instead of the example.com/order/....? – Kelvin Jul 08 '14 at 16:25

0 Answers0