Paypal is not overriding the return url?

I need to override the default Auto return

url from code paypal

HTML

. I followed these steps:

  • Check the Auto return Url section and provide the default URL.
  • Create a button Buy Now

    and leave the URL parameters Return

    and Cancel

    as they are.
  • Insert Button Code

    <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_top">
    <input type="hidden" name="return" value="http://www.someURL.com"/>
    <input type="hidden" name="cmd" value="_s-xclick">
    <input type="hidden" name="hosted_button_id" value="G3WQ*******">
    <input type="image" src="https://www.sandbox.paypal.com/en_GB/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online!">
    <img alt="" border="0" src="https://www.sandbox.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1">
    </form>
    
          

After successful payment with Sandbox

PayPal, it always redirects me to the default URL.

Why doesn't this cancel? Any help would be appreciated.

I've seen a couple of similar unanswered questions on the community paypal

and StackOverflow:

+3


source to share


1 answer


You will not be able to use a return field directly in a button when you are using a hosted button. This needs to be set in the hosted button settings when creating the button (or modifying it through your PayPal account.)



If you want to set your own URL on the fly, you will have to use the no-host button.

+1


source







All Articles