mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 05:50:50 +00:00
【程序目录】处理退款错误提示
This commit is contained in:
parent
b58f5f50cf
commit
87809fce93
@ -111,18 +111,20 @@ class WechatPay extends BasePay implements PayInterface
|
||||
$refundAccount = $opt['refund_account'] ?? 'REFUND_SOURCE_UNSETTLED_FUNDS';
|
||||
if (isset($opt['wechat'])) {
|
||||
$result = WechatService::refund($outTradeNo, $refundNo, $totalFee, $refundFee, $opUserId, $refundReason, $type, $refundAccount);
|
||||
if(isset($result['return_code']) && $result['return_code'] != 'SUCCESS') throw new AdminException($result['return_msg']);
|
||||
if(isset($result['status']) && $result['status'] != 'SUCCESS') throw new AdminException($result['status']);
|
||||
} else {
|
||||
if ($opt['pay_new_weixin_open']) {
|
||||
$result = MiniProgramService::miniRefund($outTradeNo, $totalFee, $refundFee, $opt);
|
||||
if ($result['errcode'] != 0) throw new AdminException($result['errmsg']);
|
||||
} else {
|
||||
$result = MiniProgramService::refund($outTradeNo, $refundNo, $totalFee, $refundFee, $opUserId, $refundReason, $type, $refundAccount);
|
||||
if(isset($result['return_code']) && $result['return_code'] != 'SUCCESS') throw new AdminException($result['return_msg']);
|
||||
if(isset($result['status']) && $result['status'] != 'SUCCESS') throw new AdminException($result['status']);
|
||||
}
|
||||
}
|
||||
if ($opt['pay_new_weixin_open']) {
|
||||
if ($result['errcode'] != 0) throw new AdminException($result['errmsg']);
|
||||
} else {
|
||||
if (isset($result['return_code']) && $result['return_code'] != 'SUCCESS') throw new AdminException($result['return_msg']);
|
||||
if (isset($result['result_code']) && $result['result_code'] != 'SUCCESS') throw new AdminException($result['err_code_des']);
|
||||
if (isset($result['status']) && $result['status'] != 'SUCCESS') throw new AdminException($result['status']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user