Hi ! had the same problem. resolved it with : https://www.paypal.com/us/smarthelp/article/how-do-i-modify-my-ipn-php-listener-to-support-http1.1-ts1492 //post back to PayPal system to validate (replaces old headers)
$header = "POST /cgi-bin/webscr HTTP/1.1\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Host: www.paypal.com\r\n";
$header .= "Connection: close\r\n";
$header .= "Content-Length: " . strlen($req) . "\r\n\r\n";
$fp = fsockopen ('ssl://www.paypal.com', 443, $errno, $errstr, 30); also add trim to the result test : if (strcmp (trim($res), "VERIFIED") == 0) {
//your code
}else if (strcmp (trim($res), "INVALID") == 0) {
//your code
} hope it helped !
... View more