2

I am getting this error Curl error: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure on https://payment.geeksworld.co This code work fine on wamp server.

SSL Version: OpenSSL/0.9.8zf

$curl = curl_init("https://api.paytrace.com/oauth/token");
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, rawurldecode(http_build_query(array(
'password' => 'XXXXX',
'username' => 'XXXXX',
'grant_type' => 'password'
))));
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
'Accept: */*',
'Content-Type: application/x-www-form-urlencoded'
)); 
if(curl_exec($curl) === false)
   echo 'Curl error: ' . curl_error($curl);
else
    echo 'Operation completed without any errors';
Rachit kapadia
  • 705
  • 7
  • 18
Er. Mukesh Sharma
  • 285
  • 1
  • 4
  • 16
  • As far as I can tell, it means that your OpenSSL version is too old to support the server ciphers. – MechMK1 Dec 21 '17 at 12:44
  • Can you please guide me, what should i do to update the SSL version? Is there any need to update the curl also? – Er. Mukesh Sharma Dec 21 '17 at 12:50
  • 1
    Possible duplicate of [Php curl set ssl version](https://stackoverflow.com/questions/35131590/php-curl-set-ssl-version) – MechMK1 Dec 21 '17 at 12:52
  • I think your question might be a duplicate of [this question](https://stackoverflow.com/questions/35131590/php-curl-set-ssl-version). See if the answers there help you – MechMK1 Dec 21 '17 at 12:52

0 Answers0