{{wikiTitle}}
微信支付,提示:无可用的平台证书
目录:
1.增加两个支付的配置,复制下方sql语句,在数据库中执行
INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`, `level`, `link_id`, `link_value`) VALUES (null, 'v3_pay_public_key', 'text', 'input', 4, '', 1, '', 100, 0, '\"\"', 'v3支付公钥', 'v3支付公钥,新版本使用公钥请填写', 0, 1, 0, 0, 0);
INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`, `level`, `link_id`, `link_value`) VALUES (null, 'v3_pay_public_pem', 'upload', 'input', 4, '', 3, '', 0, 0, '\"\"', 'v3支付公钥证书', 'v3支付公钥证书,使用新版本支付公钥上传此证书', 0, 1, 0, 0, 0);
2.修改文件crmeb/crmeb/services/pay/storage/V3WechatPay.php
增加两行代码
'v3_pay_public_key' => sys_config('v3_pay_public_key'),
'v3_pay_public_pem' => $this->getPemPath('v3_pay_public_pem'),
3.修改文件crmeb/crmeb/services/easywechat/v3pay/BaseClient.php
将83行代码修改成
if ($this->app['config']['v3_payment']['v3_pay_public_key'] != '') {
$options['headers']['Wechatpay-Serial'] = $this->app['config']['v3_payment']['v3_pay_public_key'];
} else {
$options['headers']['Wechatpay-Serial'] = $this->getCertficatescAttr('serial_no');
}
将191行代码修改成
if ($this->app['config']['v3_payment']['v3_pay_public_key'] != '') {
$key_path = $this->app['config']['v3_payment']['v3_pay_public_pem'];
} else {
$key_path = $this->app['config']['v3_payment']['cert_path'];
}
4.然后在后台支付配置中填写您的信息




评论({{cateWiki.comment_num}})
{{commentWhere.order ? '评论从旧到新':'评论从新到旧'}}
{{cateWiki.page_view_num}}人看过该文档


评论(0)
{{commentWhere.order ? '评论从旧到新':'评论从新到旧'}}
473人看过该文档




{{item.user ? item.user.nickname : ''}} (自评)
{{item.content}}
{{item.create_time}} 删除




搜索结果
为您找到{{wikiCount}}条结果
{{item.page_view_num}}
{{item.like ? item.like.like_num : 0}}
{{item.comment ? item.comment.comment_num : 0}}
位置:{{path.name}} {{(i+1) == item.catalogue.path_data.length ? '':'/'}}


