Hello. I have scoured EE and the internet and PayPal's site for a nice, clean description of IPN and how it works. I know I'm missing something, but I just can't wrap my head around what the correct sequence of processes/transactions should be.
Would someone, please, explain in a 1-2-3-4-etc. format and the correct syntax on the IPN page, as well? I am only using a "Buy Now" button for only one "product". When it is VERIFIED, I just want the process page to update the related user's account in the db. I can handle the Update script, I just don't know if, or when, the page is ever reached. This is basically a subscription site, except I'm not using a "subscription" button from PayPal. Just using a basic "Buy Now" button, with basic parameters of E-mail, UserID, and Price.
Here's what I have so far as I understand it:
1) User registers and logs in. Before they can see their Contol Panel to enter data for their profile, there is a PayPal button to pay their money first. After they have paid, the process page should update their account with a "Y" for "Activated", and then they can see their Control Panel. I have attached the Form as I am using it ("form.txt")
2) The user should then press the PayPal button, and will then be directed to PP to make their payment. Included in the attached form is a "return_URL" hidden field, to which the user should be directed after the PP payment completes, or when they press the "Return to Merchant" button on the PP confirmation screen. This does occur, and I can view the "payment_status" value as it was posted from PP as "Completed". However, the purpose of the IPN, as I understand it, is to have a process page to process the validity of the payment, as well as whether the payment was completed, and then a script on the process page could run to update a db, and what not.
I have another hidden field "notify_url" which is supposed to be the IPN process page; however, I never know if anything is getting to it. I use the "sample code" from PayPal, but I'm not sure how to test, or see any results, etc.
I guess that's where the 1-2-3-4-etc. sequence is needed for me. Not sure when what is supposed to be happening, and what to expect.