No-one quite seems to know what PayPal have done to their IPN script, but at the moment if you POST over a non-SSL channel (i.e. port 80) you get a 302 message returned. PayPal _say_ that PHP is the only programming language having problems at the moment, but I’ve not tested any others.
I only found out after a couple of hours trying to debug why the payment interface for the new site I’m building wasn’t working properly (debugging done by emailing the contents of every socket transaction to myself - wish there was an easier way). There was nothing on PayPal’s site about 302 errors, and I’ve never come across them before, so I turned to google. This immediately turned up “this thread”:http://www.paypaldev.org/topic.asp?TOPIC_ID=2974&whichpage=1.
I then tried using SSL connections (fsockopen on ssl://www.paypal.com and port 443). Unfortunately this didn’t work either - I was getting an unknown socket error. I think my host has SSL support compiled in properly (it appears as –with-ssl in the compilation arguments, but nowhere in the body of a PHPInfo page) so I’ve no idea what the problem is.
Finally I resorted to using “cURL”:http://uk.php.net/curl. Wish I’d done so earlier, as it worked perfectly. Bravo for cURL and its developers!
0 comments ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment