Paypal - redirect after payment to my own page

你说的曾经没有我的故事 提交于 2019-12-24 12:30:21

问题


I would like to automatically redirecta a user after successful payment to my own "thank you" page. Currently I am working with Paypal under the sandbox account and on my localhost.

Is there any way to do it? I tried to browse through the admin account in sandbox, but I didn't find something useful...


回答1:


You simply need to add a "return" variable to your button.

If you're manually creating the button, it's just a hidden field named "return" with value set to your Thank You page. Eg:

<input type="hidden" name="return" value="http://www.mysite.com/thanks.html"/>

If you're using an encoded button, then you can set this in the button wizard page of the PayPal site.

From PayPal's Payments Standard documentation [ https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables ] (It's quite long so just do a search for "return") :

return

The URL to which PayPal redirects buyers’ browser after they complete their payments. For example, specify a URL on your site that displays a “Thank you for your payment” page.

Default – PayPal redirects the browser to a PayPal webpage.



来源:https://stackoverflow.com/questions/11178686/paypal-redirect-after-payment-to-my-own-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!