My ipn.php and ipllistener.php are done and uploaded.
Now, I tried https://developer.paypal.com/developer/ipnSimulator/ and found “IPN was sent and the handshake was verified” message. However, no emails in either of the two sandbox emails, neither anything in the ipn_errors.log.
Wondering if there is anyone who has installed IPN earlier and could give me a helping hand sharind his / her experience.
I had a quick look over the tutorial and one thing that comes to mind is that your server might not be configured correctly to send email. Have you previously been able to send emails using PHP’s mail() function?
Here’s a simple script you could use to test that:
Hi fretburner, thanks for your reply. Yes the mail server is working properly. However, I have the following in the error log while testing the previous code. Not sure if they are related
False does not verify the SSL certificate from paypal.
This is the easiest way to do things. If there is a possibility of a “man in the middle” between your server and paypal, the data could be compromised.
So, if your server is in a data center, no problem. If your server is in your home, you may worry.
The IPN data is not mission critical and is the reason I use false.
Thanks fretburner. I tried that, and still no result - the WadeShuler project is very unclear.
I created 3 files api_cert_chain.crt, ipnlistener.php and ipn.php and uploaded to my domain.com/ location.
Changed paths in ipnlistener.php & ipn.php. They are now : require_once( ‘IpnListener.php’); and curl_setopt($ch, CURLOPT_CAINFO, dirname(dirname(FILE)) . ‘/api_cert_chain.crt’); since I am using all files at the same location.
I have namespace wadeshuler\paypalipn; and use wadeshuler\paypalipn\IpnListener; in the two files respectively. Do I need to create a folder wadeshuler ? And why are the slashes reversed ?
In ipn.php, it would have been good to finish it with error handling and database updating // this is rather a feature request.
I have loaded ipn.php both via paypal button via actual payment and directly, I have nothing in either ipn_success.log or ipn_error.log
Sounds like Windows filesystem path format to me. eg.
On Nix it might be C:/something/bin/start.exe
but on Windows it would be C:\something\bin\start.exe
Don’t confuse filesystem paths with HTTP paths which are all “/”
Thanks lorenw. Do you mean that to put this code in a file linked via notify_url ? And then by reading a few forums I understood that there is always a few risks unless we go through the ipn method - have you come across that idea ?