贝宝 PDT 和IPN 问题 - 我们可以假设返回网站后付款已完成吗?
当客户自动返回我们的网站时,我们是否可以假设交易付款已完成?
Paypal 建议我们使用他们的 IPN 系统进行其他类型的付款,例如电子支票,但也告诉我们要告诉客户“感谢您的付款。您的交易已完成,并且会收到收据”。您的购买已通过电子邮件发送给您。您可以登录您的 www.paypal.com/ca 帐户查看此交易的详细信息。”
不使用 IPN,而只是假设当 PayPal 自动将用户返回到我们的网站时付款已完成,有哪些缺点?
谢谢!
Can we assume that the payment is completed for a transaction when the customer is auto returned to our site?
Paypal advices us to use their IPN system for other types of payment, like an e-check, but also tells us to tell the customer something along the lines of "Thank you for your payment. Your transaction has been completed, and a receipt for your purchase has been emailed to you. You may log into your account at www.paypal.com/ca to view details of this transaction."
What are the downfalls of not using IPN, and just assuming the payment is completed when paypal auto-returns users to our site?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
仅仅依赖返回 URL 是一个非常糟糕的主意。对于坏人来说,跳过付款并仅访问您的退货网址即可完成订单是很容易的。
这里有一篇非常全面的文章
Relying solely on the return url is a pretty bad idea. It would be easy for a bad guy to skip payment and just visit your return url to complete the order.
There is a pretty comprehensive article about this here
不会
。但是,例如,将 Paypal 帐户中的自动退货选项与付款数据传输(个人资料/我的销售工具/网站首选项/网站付款首选项)结合使用,将在您用于自动退货的 URL 中提供付款确认数据:
www.yourReturnURL.com?tx=9XV61416UY0043254&st=Completed&amt=9%2e00&cc=USD&cm= 9601&item_number=2
您需要验证此数据(任何人都可以发送假请求)通过将付款参考(上面的“tx”参数)发送回 Paypal 并等待 VERIFIED 响应。
最后一步与实施 IPN(即时付款通知)所采取的步骤相同。
通过 PDT,您可以立即收到通知。 PDT 有一个主要弱点:它发送订单确认一次且仅一次。因此,当 PDT 发送确认时,您的站点必须正在运行;否则,它将永远不会收到消息。
相比之下,使用 IPN,实际上可以保证订单确认的送达,因为 IPN 会重新发送确认,直到您的站点确认收到为止。因此,PayPal 建议您实施 IPN 而不是 PDT。
注意:如果您的网站必须立即收到付款通知,您可以同时实施 IPN 和 PDT。
更多信息请参见:https://developer.paypal.com/docs/经典/ipn/集成指南/IPNPDTAnAlternativetoIPN/
No.
However, using the Auto Return option in your Paypal account in conjunction with Payment Data Transfer (Profile/My Selling Tools/Website preferences/Website Payment Preferences) will give you payment confirmation data in the URL you use for Auto Return, for example:
www.yourReturnURL.com?tx=9XV61416UY0043254&st=Completed&amt=9%2e00&cc=USD&cm= 9601&item_number=2
You need to verify this data (anyone could send a fake request) by sending the payment reference ("tx" parameter above) back to Paypal and waiting for a VERIFIED response.
This last step is identical as the one you take for the IPN (Instant Payment Notification) implementation.
With PDT you get the notification instantly. PDT has a a major weakness: it sends order confirmations once and only once. As a result, when PDT sends a confirmation, your site must be running; otherwise, it will never receive the message.
With IPN, in contrast, delivery of order confirmations is virtually guaranteed since IPN resends a confirmation until your site acknowledges receipt. For this reason, PayPal recommends that you implement IPN rather than PDT.
Note: If your site must be notified of payments immediately, you can implement both IPN and PDT.
More info here: https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNPDTAnAlternativetoIPN/