Search code examples
paypalpaypal-ipn

PayPal button IPN handling


I have a simple "pay now" PayPal button on my website. I also have a server listening for IPNs. The IPN handler basically updates the validity of my user´s account.

But what´s hard for me to do is the correct handling of the IPN. The basic handling with the validation step is no problem. But I also need to check and handle the transaction type and payment status.

In the PayPal docs there are many different values for different cases (express checkout and other stuff I don´t even know what it is). That confuses me because I don´t know which values are relevant for my case.

Does anyone know a good and simple tutorial or example of how to handle IPN? (which goes a little bit further than how to receive the IPN)


Solution

  • The PayPal IPN Variables documentation lists all of the transaction types and the values you would expect from the different types of payments you could be processing. The descriptions next to each should give you the info you need about when you should be looking for one value vs. another.

    So you said you're using basic Pay Now button, right? Based on the documentation this would send a web_accept IPN.

    Payment received; source is any of the following:

    • A Direct Credit Card (Pro) transaction
    • A Buy Now, Donation or Smart Logo for eBay auctions button