feat: 新增师傅入驻审核与接单状态联动功能
- 新增师傅资质审核模块及权限 - 未审核通过的师傅默认禁用接单状态 - 新增售后退款申诉功能与相关界面 - 新增用户钱包管理及充值功能 - 更新服务定价矩阵相关数据库结构 - 修复微信支付证书验证问题
这个提交包含在:
@@ -568,6 +568,11 @@ class WxPayV3Service
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 6);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
|
||||
|
||||
$caPath = $this->resolveCaCertPath();
|
||||
if ($caPath !== '') {
|
||||
curl_setopt($ch, CURLOPT_CAINFO, $caPath);
|
||||
}
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
||||
curl_setopt($ch, CURLOPT_HEADERFUNCTION, function ($curl, $headerLine) use (&$respHeaders) {
|
||||
$len = strlen($headerLine);
|
||||
@@ -1078,4 +1083,40 @@ class WxPayV3Service
|
||||
}
|
||||
return $candidate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析根 CA 证书路径(自愈 Windows / 服务器环境下 cURL 缺失根证书信任链导致 cURL 60 的问题)
|
||||
*
|
||||
* @return string 有效可读的 cacert.pem 绝对路径,未找到时返回空字符串
|
||||
*/
|
||||
protected function resolveCaCertPath()
|
||||
{
|
||||
$root = defined('ROOT_PATH') ? rtrim(ROOT_PATH, '/\\') : dirname(__DIR__, 3);
|
||||
|
||||
// 1. 优先加载项目内置官方 Mozilla CA 根证书包(addons/epay/certs/cacert.pem)
|
||||
$local = $root . DIRECTORY_SEPARATOR . 'addons' . DIRECTORY_SEPARATOR . 'epay' . DIRECTORY_SEPARATOR . 'certs' . DIRECTORY_SEPARATOR . 'cacert.pem';
|
||||
if (@is_file($local) && @is_readable($local)) {
|
||||
return $local;
|
||||
}
|
||||
|
||||
// 2. Windows 常见 Git 安装自带 CA 根证书包
|
||||
$gitCa = 'D:/Softwares/Git/usr/ssl/certs/ca-bundle.crt';
|
||||
if (@is_file($gitCa) && @is_readable($gitCa)) {
|
||||
return $gitCa;
|
||||
}
|
||||
|
||||
// 3. php.ini 中配置的 curl.cainfo
|
||||
$iniCa = (string)ini_get('curl.cainfo');
|
||||
if ($iniCa !== '' && @is_file($iniCa) && @is_readable($iniCa)) {
|
||||
return $iniCa;
|
||||
}
|
||||
|
||||
// 4. php.ini 中配置的 openssl.cafile
|
||||
$sslCa = (string)ini_get('openssl.cafile');
|
||||
if ($sslCa !== '' && @is_file($sslCa) && @is_readable($sslCa)) {
|
||||
return $sslCa;
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户