Hidden "return" value does not override the default return url
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I just set up a nice pay now button for my website and want to redirect the user to a specific page after checkout. I am attempting to do this via the hidden input named "return", just as paypal documentation specifies:
<INPUT TYPE="hidden" NAME="return" value="'.$return_url.'">
the $return_url, in my case, is dynamically generated via php and outputs something like: https://example.com/confirm_transaction.php?product_id=1
My problem is, that, despite using the correct syntax in my HTML form, paypal always redirects the customer (which of course is me as I am testing my implementation) to the default return URL specified in my (business accounts') account settings.
Any help with this issue would be greatly appreciated.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My assumption is that your button is a hosted button, in which case most variables included in the button code directly will be ignored. Hosted buttons needs to be updated in the PayPal account button manager. If you need to dynamically set your return URL you'll need to use a non-hosted button.
Another option would be to switch to Express Checkout, which is recommended, but would require more development experience. That said, our PayPal PHP SDK makes setting up these API calls very quick and easy for you.
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- PayPal Buttons not visible in Sandbox Environment
- Shipping options are not appearing in my cart through link or button. in PayPal Payments Standard
- Change the button from Sandbox to Production in REST APIs
- PAYER_ACTION_REQUIRED returned for Capture intent when calling v2 checkout orders in Sandbox Environment
- payment button error with return variable in PayPal Payments Standard