I've been bashing my head against a brick wall the last few days on minor problems. This time I am on the final piece to the puzzle. In my php function of a wordpress cart plugin I have the following:
Relevant Function - http://codepad.org/uDm3q9yp
Paypal Class - http://codepad.org/friBthoO
I manage to go through the purchase fine. If I check on the sandbox account the seller receives the correct email from paypal and money etc. The case "IPN" in the function doesn't seem to work however. No email is sent with details. The success case is reached with a thank you page shown though. I don't understand how I could have missed anything. Any ideas?
I'll be straight forward I'm not gonna sit here and test your script, but I understand the pain of trouble shooting an IPN script from my past experience so I'll share some tips:
- use a IPN tester/simulator: https://cms.paypal.com/ca/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_admin_IPNTesting
- check if it can reach your script address
- check if your script is communicating back
- check if you are getting a VALID response back from Paypal
- if this works check where Paypal is sending its IPN info to the right script
- try storing all of the POST information from Paypal IPN into a database to debug or look at the GET string on Paypal's site under IPN history
- variables are URL encoded make sure you decode them