修复小程序退款找不到证书的问题

This commit is contained in:
evoxwht 2021-10-08 09:10:55 +08:00
parent 79fd3a5c0d
commit 028f846317

View File

@ -383,7 +383,7 @@ class MiniProgramService
public static function payOrderRefund($orderNo, array $opt)
{
if (!isset($opt['pay_price'])) throw new AdminException('缺少pay_price');
if (sys_config('pay_routine_client_key') == '' || sys_config('pay_routine_client_cert') == '') throw new AdminException('请配置支付证书');
if (sys_config('pay_weixin_client_key') == '' || sys_config('pay_weixin_client_cert') == '') throw new AdminException('请配置支付证书');
$totalFee = floatval(bcmul($opt['pay_price'], 100, 0));
$refundFee = isset($opt['refund_price']) ? floatval(bcmul($opt['refund_price'], 100, 0)) : null;
$refundReason = isset($opt['desc']) ? $opt['desc'] : '';