PHP Classes

PayPal Sandbox issue

Recommend this page to a friend!

      PHP Paypal IPN Integration Class  >  All threads  >  PayPal Sandbox issue  >  (Un) Subscribe thread alerts  
Subject:PayPal Sandbox issue
Summary:sandbox ipn requires ssl connection to validate
Author:marco b
Date:2012-04-16 12:03:10

  1. PayPal Sandbox issue   Reply   Report abuse  
Picture of marco b marco b - 2012-04-16 12:03:10
IPN on sandbox is always failing. The sandbox requires now ssl connection to correctly validate back IPN

Making an ssl connection in validate_ipn() solved the issue for me (line 162):

//$fp = fsockopen($url_parsed[host],"80",$err_num,$err_str,30);
$fp = fsockopen('ssl://'.$url_parsed[host],"443",$err_num,$err_str,30);

I found the solution here: ...

I have not yet tested this solution in production environments, I'll post results asap.