微信支付:curl出错,错误码:60
如下是运行微信支付测试代码时出错代码:
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
解决于下
第538行
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,TRUE); curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,2);//严格校验
修改为
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,FALSE); curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,FALSE);//严格校验