My Current PHP version is 5.3. Recently I have updated it 5.2 to 5.3
I have searched in google I can't find any solution regarding the PayPal IPN validation.
I saw my phpinfo()
there are enabled OPenSSL but still I am getting this error message -
Warning: fsockopen() [function.fsockopen]: SSL operation failed with code 1. OpenSSL Error messages: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure in /home/xxx/public_html/paypal_test/socketopen.php on line 5
Warning: fsockopen() [function.fsockopen]: Failed to enable crypto in /home/xxx/public_html/paypal_test/socketopen.php on line 5
Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://www.sandbox.paypal.com:443 (Unknown error) in /home/xxx/public_html/paypal_test/socketopen.php on line 5
()
My Code is -
<?php
$fp = fsockopen ( 'ssl://www.sandbox.paypal.com', "443", $err_num, $err_str, 60);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
} else {
$out = "GET / HTTP/1.1\r\n";
$out .= "Host: www.sandbox.paypal.com\r\n";
$out .= "Connection: Close\r\n\r\n";
fwrite($fp, $out);
while (!feof($fp)) {
echo fgets($fp, 128);
echo "<br>";
}
fclose($fp);
}
?>
I have used same code in different server this code is working fine. But this is not working in my own server. Please check below two screenshot-
Actual Output -
My output -
I read php-paypal-error: 14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure But not getting any exact solution for that. Please check and let me know.
Thank you.