我在https://payment.geeksworld.co上收到此错误Curl error: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
此代码在wamp服务器上正常工作。
SSL版本: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';