牛骨文教育服务平台(让学习变的简单)
博文笔记

微信扫码支付报错:curl出错,错误码:60

创建时间:2015-12-09 投稿人: 浏览次数:2433

【错误描述】

<span style="font-family:FangSong_GB2312;font-size:24px;">Fatal error: Uncaught exception "WxPayException" with message "curl出错,错误码:60" in D:wwwrootweixinlibWxPay.Api.php:564 Stack trace: #0 D:wwwrootweixinlibWxPay.Api.php(62): WxPayApi::postXmlCurl("<xml><appid><![...", "https://api.mch...", false, 6) #1 D:wwwrootweixinexampleWxPay.NativePay.php(52): WxPayApi::unifiedOrder(Object(WxPayUnifiedOrder)) #2 D:wwwrootweixinexample
ative.php(41): NativePay->GetPayUrl(Object(WxPayUnifiedOrder)) #3 {main} thrown in D:wwwrootweixinlibWxPay.Api.php on line 564</span>

【解决方案】

修改lib下WxPay.Api.php文件

第537行

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);


OK

声明:该文观点仅代表作者本人,牛骨文系教育信息发布平台,牛骨文仅提供信息存储空间服务。