PayPal payment verification

I downloaded a sample code from PayPal to allow me to use concurrent payments through their sandbox tabs. When I run parallel.php, I am redirected to the paypal sandbox login page.

How should I know the "server side" that the payment was successful, so I can update the records in the database?

+4
source share
2 answers

I believe that you need to work with PayPals IPN. This will basically send a confirmation to your server, which tells you that it has passed.

https://www.paypal.com/ipn

+7
source

Paypal allows you to register a notification URL, which is part of the IIRC system for immediate notification of payment. Therefore, if someone pays for a delay in payment (for example, a bank transfer), the transaction will be updated in a few days. You need to have an application (web page) on your server that can call Paypal with transaction data to update the payment.

You will need to create an initial transaction record on your system when paypal redirects you back, so refer to their documentation for this. I also recommend looking at OSCommerce or Zen cart for how they do it, as they support the same thing.

+1
source

Source: https://habr.com/ru/post/1346528/


All Articles