Monday, November 28, 2011

HTTP/1.0 302 Found - PayPal IPN in PHP

I was getting the error "HTTP/1.0 302 Found" when trying to configure some old PayPal IPN code that I had in PHP.

So I found on this forum that what I needed to do was open my paypal.inc.php file and change the following line:

$fp= @ fsockopen($this->paypalurl,80,$errno,$errstr,30);

to this one:
$fp = fsockopen('ssl://'.$this->paypalurl,"443",$err_num,$err_str,30);

Looks like the PayPal IPN is not taking non SSL connections anymore?

5 comments:

  1. I've been having trouble since I got back from my vacation on Oct 23. It was working before I left on Oct 16. I have been killing myself trying to figure out what I did wrong. Then I checked the ipn log file and saw the error message which lead me to your post. I have to thank you. I changed that line in my code and miraculously it's working now! Now I can move ahead with this project! It would be nice if they would have this posted somewhere on the Paypal support side. I haven't seen anything but I've seen a lot of people who seem to be having the same problem!

    ReplyDelete
  2. thanks it helpped me.

    ReplyDelete
  3. Nice post and thanks for sharing its really help me.

    ALEX Roads
    error 1316 windows 7

    ReplyDelete
  4. Excellent post. I've been struggling with this for 2 days now - at last I can move forward again. Isn't web development fun !!

    ReplyDelete