I have an ecommerce website written in php.
The url: http://www.jesuschrist-shop.com (SSl certificate is issued)
I use paypal as a payment gateway.
I use curl to connect to the paypal server
Here is my code:
//setting the curl parameters.
$o_curl = curl_init() ;
curl_setopt($o_curl, CURLOPT_URL, PAYPAL_API_ENDPOINT) ;
curl_setopt($o_curl, CURLOPT_VERBOSE, 1) ;
curl_setopt($o_curl, CURLOPT_RETURNTRANSFER, 1) ;
curl_setopt($o_curl, CURLOPT_POST, 1) ;
//setting the $s_nvp_req as POST FIELD to curl
curl_setopt($o_curl, CURLOPT_POSTFIELDS, $s_nvp_req) ;
//getting response from server
$s_response = curl_exec($o_curl) ;
I get the following error message:
error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure
I added 3 lines of code
curl_setopt($o_curl, CURLOPT_SSLVERSION, 2) ;
//turning off the server and peer verification(TrustManager Concept).
curl_setopt($o_curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($o_curl, CURLOPT_SSL_VERIFYHOST, FALSE);
and got this error message
Error Message: error:1406C0C8:SSL routines:GET_SERVER_FINISHED peer error
Is there problem with my code or the ssl ? and if the problem
in the ssl what should I check in the SSL ?
Thanks and best regards