What if the user is not redirected after PayPal payment?

After adding a material to the shopping cart, clicking the Pay Now button with PayPal, and a successful PayPal payment (PP or CC), it is logically possible that the user remains on the PayPal website if, for example, the Auto Return option is activated (or it works, but it doesn't work as the user is a guest user without a PP account)

The user can return to the site by clicking the link, but not necessarily. My question is, if he doesn't, how will the site owner know that the user has paid so that they can now post items? The fact that the site owner receives information that it has been paid seems elementary to me, so I find it incomprehensible that such an elementary thing should be left for some unclear option of automatic return.

Please can someone explain this to me?

+3


source to share


3 answers


This is a common problem with any redirected payment gateway, and this is the reason why most (if not all) of them implement some kind of asynchronous notification that a payment has been completed. At PayPal, this is Instant Payment Notification (IPN). You have to set up on your site either the generic IPN listener you are linking to, either through your PayPal account profile settings, or create a more targeted IPN listener specifically for your transactions and use the NOTIFYURL (or related) parameter on the form or API request. use to redirect to PayPal to send IPN to this listener.

In my integrations, I never do any order update or transaction logging when a customer returns from the site, preferring instead to wait for an IPN that I can verify and secure came from PayPal, as opposed to a fake refund from someone trying to hack my checkout process.



For more information see the IPN documentation: https://www.x.com/developers/paypal/documentation-tools/ipn/integration-guide/IPNIntro

+5


source


Paypal provides an IPN for this purpose through which we send an asynchronous post request to your site and you can perform any action you want



+1


source


I think this point may have been missed here. Or the problem exists. If the buyer is using CC, even if you have an IPN installed and it works, but if the buyer is using CC and does not click on the button on the last page that does not appear when using a PP account, it is possible for the funds to pass, but not the IPN, and therefore your site is unaware of the purchase. This last page is the sub page that the CC user gets after the page using the "Pay" button.

In this state, you can even enter the IPN history and there is an IPN there, says it was sent, but it was not. It is not dispatched until the buyer clicks a button on the sub page, and then they are sent to an auto return page.

0


source