简体   繁体   English

处理突然的PayPal付款取消

[英]Handling abrupt PayPal payment cancellations

I have an ASP.net application. 我有一个ASP.net应用程序。

The User can purchase 1 of my products via PayPal. 用户可以通过贝宝购买我的产品之一。

When the User is redirected to the PayPal site for confirmation and processing of the payment what happens if the User does not make the payment but also closes the web page rather than the cancel button? 当用户被重定向到PayPal网站以确认和处理付款时,如果用户不进行付款,而是关闭了网页而不是取消按钮,该怎么办?

How long should I wait to see if an order has gone though (or not)? 我应该等多久才能查看订单是否通过(或没有通过)? Thanks 谢谢

There are two ways that paypal informs you for a payment, or a cancellation, or an issue in general. 贝宝通常通过两种方式通知您付款,取消或出现问题。 These are the: 这些是:

The PDT is data that paypal send you when the user is return back to your page, and IPN are data that send you dynamically even if user did not return back to you. PDT是当用户返回您的页面时Paypal发送给您的数据,而IPN是即使用户没有返回给您时也动态发送给您的数据。

The suggestions is to implement both of this on your site. 建议在您的网站上同时实现这两个功能。 There are sdk and asp.net samples direct from PayPal on how to do it, and all the details about. PayPal提供了有关如何操作的sdk和asp.net示例,以及有关的所有详细信息。

On the links above there all you need to know to develop it. 在上面的链接上,您需要了解所有内容来开发它。

Especial to your question, this IPN page, have examples on how to capture infomations about payments even if the user did not come back. 尤其对于您的问题,此IPN页面包含有关如何捕获有关付款的信息的示例 ,即使用户没有回来也是如此。

If a payment is not done with in 30 minutes, the you can consider it canceled, because the session of the payment on paypal side is less than 30 minutes. 如果未在30分钟内完成付款,则您可以认为已取消付款,因为在贝宝(PayPal)端的付款时间少于30分钟。

More details on session: The paypal session is 15 minutes if user did not do anything. 会话的更多详细信息:如果用户未执行任何操作,则贝宝会话为15分钟 Consider now that if user go for the payment, and fails, eventually will stop interactive with pp after some minutes. 现在考虑一下,如果用户付款并失败,最终将在几分钟后停止与pp的交互。 So we have 15 minutes paypal session + some minutes for user tries to pay, you have at least 30 minutes that you can wait the user to pay. 因此,我们有15分钟的贝宝会话+几分钟的时间让用户尝试付款,您至少有30分钟的时间可以等待用户付款。

If the user, cancel, or close and come back to use, and ask again for to pay, then you - and paypal creates a new order id, and the payment will be be done on the second order id (not on the first) 如果用户取消,关闭或关闭并再次使用,然后再次要求付款,则您-贝宝创建了一个新的订单ID,付款将在第二个订单ID上完成(而不是在第一个订单上)

And here are some samples code : http://paypal.github.io/sdk/sample-apps/ 这是一些示例代码: http : //paypal.github.io/sdk/sample-apps/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM