How do you register PayPal IPN messages?

From the PayPal documentation: “PayPal returns related variables for each type of IPN message. Not all variables are returned for each type of transaction.”

At first, I planned to create a table in the database with message fields, but now, after I read this, it no longer seems like a good idea (especially that I see a lot of fields in my IPN documentation).

I have some ideas (for example, using tabs and newlines containing individual fields and values, or storing everything in XML in a database), but just wondering how you handle IPN message logging?

+4
source share
3 answers

What I am doing is storing it in a database table with columns for my important information along with a raw column. I take the configuration of the form parameters and serialize it as a query string and insert it. Thus, all the source information is available if I need it, but my database schema remains simple and reflects information that is important to me.

+7
source

I would agree with the previous comment. IPN messages can be quite variable and can be around 40-50 fields for each view. Just pull a few fields that you need for your application (quantity, customer information, etc.), and leave the rest in the XML or TEXT field if you need it later.

0
source

I had the same problems when I integrated adaptive PayPal Payment. The fastest way I did was to save the IPN data (when PayPal calls the IPN handler I made) for a static variable so that the values ​​can be displayed regardless of the browsers you use.

0
source

All Articles