- Impact
- 38
PayPal IPN + serialize() question
Guys I am totally having a brain fart here.
I have a form with about 7 fields that need to be inserted into the mysql database upon submission. The script then needs to direct the user to paypal where upon payment, paypal will notify my site and update the listing's `paid` column to 1. (There is also a 'free listing' form which does the same thing, so I have a column in the database called 'paid', which is enum 1 or 0).
My question is, should I be doing the INSERT AFTER the payment is verified through IPN? Am I creating more work for myself by inserting then updating after verification? How does serialize play into all of this? I am in need of a good beginner tutorial apparently.
NOTE: I also noticed PayPal provides a custom field marked 'custom' for you to pass data into. How can I serialize the data into a 'custom' variable before sending it off to paypal?
Your answers are appreciated, thanks
Guys I am totally having a brain fart here.
I have a form with about 7 fields that need to be inserted into the mysql database upon submission. The script then needs to direct the user to paypal where upon payment, paypal will notify my site and update the listing's `paid` column to 1. (There is also a 'free listing' form which does the same thing, so I have a column in the database called 'paid', which is enum 1 or 0).
My question is, should I be doing the INSERT AFTER the payment is verified through IPN? Am I creating more work for myself by inserting then updating after verification? How does serialize play into all of this? I am in need of a good beginner tutorial apparently.
NOTE: I also noticed PayPal provides a custom field marked 'custom' for you to pass data into. How can I serialize the data into a 'custom' variable before sending it off to paypal?
Your answers are appreciated, thanks