mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
[更新]增加微信支付测试退款
This commit is contained in:
parent
0e397dfc31
commit
ec32f818e8
@ -81,14 +81,18 @@ class Config extends BasicAdmin {
|
|||||||
break;
|
break;
|
||||||
// 检查订单是否支付成功
|
// 检查订单是否支付成功
|
||||||
case 'refund':
|
case 'refund':
|
||||||
|
|
||||||
$order_no = session('pay-test-order-no');
|
$order_no = session('pay-test-order-no');
|
||||||
if (empty($order_no)) {
|
if (empty($order_no)) {
|
||||||
$this->error('指定测试订单号不存在,请重新开始支付测试!');
|
$this->error('测试订单号不存在,请重新开始支付测试!');
|
||||||
}
|
}
|
||||||
if (!PayService::isPay($order_no)) {
|
if (!PayService::isPay($order_no)) {
|
||||||
$this->error('指定测试订单未支付或未收到微信支付通过!');
|
$this->error('测试订单未支付或未收到微信支付通过!');
|
||||||
}
|
}
|
||||||
$pay = &load_wechat('pay');
|
$pay = &load_wechat('pay');
|
||||||
|
if (!file_exists($pay->config['ssl_cer']) || !file_exists($pay->config['ssl_key'])) {
|
||||||
|
$this->error('微信支付双向证书异常,无法完成退款操作!');
|
||||||
|
}
|
||||||
$refund_no = DataService::createSequence(10, 'wechat-pay-test');
|
$refund_no = DataService::createSequence(10, 'wechat-pay-test');
|
||||||
if (false !== PayService::putWechatRefund($pay, $order_no, 1, $refund_no)) {
|
if (false !== PayService::putWechatRefund($pay, $order_no, 1, $refund_no)) {
|
||||||
$this->success('操作退款成功!', '');
|
$this->success('操作退款成功!', '');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user