tags:

views:

123

answers:

1

Hi - what's the best way to simply get feedback from PayPal to confirm that your customer paid? It looks as if the answer is IPN - if so, my followup question is, can I enable IPN for only specific buttons? I don't want PayPal pinging my IPN listener for purchases that don't require any kind of IPN integration.

I'm all about Agile and YAGNI, and therefore I don't want to do anything that is unnecessary.

A: 

You should read the IPN Documentation that have provided by PayPal. To use IPN, the simple way is to have invoice id for a transaction that you want to track. In the IPN listener page, you will get ipn_data and one of the field is the invoice. Using this id, you should get the data from your own transaction database, then change the status to reflect the payment status in PayPal.

In my code, usually I set status to unpaid, direct the user to paypal to do payment, and in IPN listener I will set the status to paid.

PayPal provide sample code so you can start right away. You can also see other PayPal documentation in this page.

Donny Kurnia