How to track recurring payment details with paypal in php?

1k Views Asked by At

I am using paypal as my payment gateway in one of my cakephp 3.3.

I have already done with recurring payment and it is working fine.But i am not able to track every payment of specific user after the recurring payment start.

So please help me on this, how can i track each payment details which occurs with recurring payment. I want to keep this record in my database.

Thanks in advance.

1

There are 1 best solutions below

3
Drew Angell On

Take a look at Instant Payment Notification (IPN).

Each time a transaction occurs on your PayPal account, PayPal will send a POST request of the transaction data to a URL that you specify.

Your script / URL can receive that data and process it however you need to. It happens automatically, and in most cases instantly when the transaction occurs.

You can build updates to your database, email notifications, hits to 3rd party web services, etc. into an IPN solution.

UPDATE

For those using the REST API then instead of IPN you would use Webhooks. They're technically the same thing, but function slightly differently.