Reputation: 7344
I have an ASP.net application.
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?
How long should I wait to see if an order has gone though (or not)? Thanks
Upvotes: 1
Views: 397
Reputation: 66641
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.
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.
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.
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.
More details on session: The paypal session is 15 minutes if user did not do anything. Consider now that if user go for the payment, and fails, eventually will stop interactive with pp after some minutes. 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.
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)
And here are some samples code : http://paypal.github.io/sdk/sample-apps/
Upvotes: 2