Original: http://www.cnblogs.com/txw1958/p/wxpay-curl-error.html
2. curl error code 60
The scene appears
The following is the error code when running the WeChat payment test code:
Fatal error: Uncaught exception ‘WxPayException‘ with message ‘curl出错,错误码:60‘ in C:\wwwroot\fangbei\lib\WxPay.Api.php:564 Stack trace: #0 C:\wwwroot\fangbei\lib\WxPay.Api.php(62): WxPayApi::postXmlCurl(‘<xml><appid><![...‘, ‘https://api.mch...‘, false, 6) #1 C:\wwwroot\fangbei\pay\jsapi.php(36): WxPayApi::unifiedOrder(Object(WxPayUnifiedOrder)) #2 {main} thrown in C:\wwwroot\fangbei\lib\WxPay.Api.php on line 564
Cause Analysis
Certificate verification failed
Solution
line 538
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,TRUE); curl_setopt( $ch ,CURLOPT_SSL_VERIFYHOST,2); // strict verification
change into
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,FALSE); curl_setopt( $ch ,CURLOPT_SSL_VERIFYHOST, FALSE ); // strict verification