From ec32f818e8e57a5af47938b2d1f8b488c609a3d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Thu, 13 Apr 2017 23:08:08 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E5=A2=9E=E5=8A=A0=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E6=94=AF=E4=BB=98=E6=B5=8B=E8=AF=95=E9=80=80=E6=AC=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/wechat/controller/Config.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/application/wechat/controller/Config.php b/application/wechat/controller/Config.php index bd2e246ff..2b5b61f59 100644 --- a/application/wechat/controller/Config.php +++ b/application/wechat/controller/Config.php @@ -81,14 +81,18 @@ class Config extends BasicAdmin { break; // 检查订单是否支付成功 case 'refund': + $order_no = session('pay-test-order-no'); if (empty($order_no)) { - $this->error('指定测试订单号不存在,请重新开始支付测试!'); + $this->error('测试订单号不存在,请重新开始支付测试!'); } if (!PayService::isPay($order_no)) { - $this->error('指定测试订单未支付或未收到微信支付通过!'); + $this->error('测试订单未支付或未收到微信支付通过!'); } $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'); if (false !== PayService::putWechatRefund($pay, $order_no, 1, $refund_no)) { $this->success('操作退款成功!', '');