【发布时间】:2015-04-16 13:59:25
【问题描述】:
我需要一个解决方案,以防止访问者在未付款或已付款但想再次访问时访问 pay-pal 返回 url(成功页面)。
如何让访问者在通过 pay-pal 付款后仅看到此 returl 网址 1 次?
感谢您的帮助
【问题讨论】:
标签: paypal http-referer returnurl
我需要一个解决方案,以防止访问者在未付款或已付款但想再次访问时访问 pay-pal 返回 url(成功页面)。
如何让访问者在通过 pay-pal 付款后仅看到此 returl 网址 1 次?
感谢您的帮助
【问题讨论】:
标签: paypal http-referer returnurl
您必须在您的 PayPal 帐户中启用自动退货,否则它将忽略退货字段。
来自文档(更新以反映新布局):
Auto Return is turned off by default. To turn on Auto Return:
1 - Log in to your PayPal account at https://www.paypal.com. The My Account Overview page appears.
2 - Click the Profile subtab. The Profile Summary page appears.
3 - Click the My Selling Tools link in the left column.
4 - Under the Selling Online section, click the Update link in the row for Website Preferences. The Website Payment Preferences page appears
5 - Under Auto Return for Website Payments, click the On radio button to enable Auto Return.
6 - In the Return URL field, enter the URL to which you want your payers redirected after they complete their payments. NOTE: PayPal checks the Return URL that you enter. If the URL is not properly formatted or cannot be validated, PayPal will not activate Auto Return.
7 - Scroll to the bottom of the page, and click the Save button.
IPN 用于即时付款通知。与自动返回相比,它会为您提供更可靠/有用的信息。
IPN 的文档在这里:https://www.x.com/sites/default/files/ipnguide.pdf
IPN 在线文档:https://developer.paypal.com/docs/classic/ipn/gs_IPN/
一般的程序是您在请求中传递一个 notify_url 参数,并设置一个处理和验证 IPN 通知的页面,PayPal 将向该页面发送请求以在付款/退款/等时通知您。经过。该 IPN 处理程序页面将是更新数据库以将订单标记为已付款的正确位置。
【讨论】: