3

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.

  • Welcome to Stack Overflow. Please check this: [How do I ask a good question?](http://stackoverflow.com/help/how-to-ask) – Patrick Mlr Oct 07 '16 at 05:36

1 Answers1

0

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.

Drew Angell
  • 25,968
  • 5
  • 32
  • 51
  • Thanks @Andrew. I have researched on webhooks first, then I came to know about IPN. I am implementing recurring payment feature, but I found that paypal does not provide notificaions via webhooks for recurring payments, each time payment takes place. I am setting `NotifyUrl` in `SetExpressCheckoutReq` object from php sdk I used. But I don't get any response. Let me know if I am doing anything wrong. – Rahul Yadav Oct 07 '16 at 05:50
  • Sorry we are not using rest-api, we are using NVP-SOAP API. – Rahul Yadav Oct 07 '16 at 06:29
  • Ok, then in that case you'll use IPN as I originally said. I'm going to leave the note about REST for anybody else that may see this. – Drew Angell Oct 07 '16 at 18:45