如下是运行微信支付测试代码时出错代码:
Fatal error: Uncaught exception ‘WxPayException‘ with message ‘curl出错,错误码:60‘ in C:wwwrootfangbeilibWxPay.Api.php:564 Stack trace: #0 C:wwwrootfangbeilibWxPay.Api.php(62): WxPayApi::postXmlCurl(‘<xml><appid><![...‘, ‘https://api.mch...‘, false, 6) #1 C:wwwrootfangbeipayjsapi.php(36): WxPayApi::unifiedOrder(Object(WxPayUnifiedOrder)) #2 {main} thrown in C:wwwrootfangbeilibWxPay.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);//严格校验