[更新]修改微信支付测试退款操作

This commit is contained in:
邹景立 2017-04-14 12:47:14 +08:00
parent 75b2bc83e8
commit 755c78621a
2 changed files with 5 additions and 4 deletions

View File

@ -95,7 +95,7 @@ class Config extends BasicAdmin {
$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)) {
session('pay-test-order-no', null); session('pay-test-order-no', null);
$this->success('操作退款成功!', ''); $this->success('测试退款操作成功,请查看微信通知', '');
} }
$this->error("操作退款失败,{$pay->errMsg}[{$pay->errCode}]"); $this->error("操作退款失败,{$pay->errMsg}[{$pay->errCode}]");
break; break;

View File

@ -98,7 +98,7 @@
var isShow = false; var isShow = false;
var timer = null; var timer = null;
var layIndex =0; var layIndex = 0;
/*! 支付测试动作 */ /*! 支付测试动作 */
function payTest() { function payTest() {
$.form.load('{:url("pay")}?action=payqrc', {}, 'get', function (ret) { $.form.load('{:url("pay")}?action=payqrc', {}, 'get', function (ret) {
@ -138,8 +138,9 @@
$.form.load('{:url("pay")}?action=refund', {}, 'get', function (ret) { $.form.load('{:url("pay")}?action=refund', {}, 'get', function (ret) {
if (ret.code === 1) { if (ret.code === 1) {
timer && window.clearInterval(timer), timer = null; timer && window.clearInterval(timer), timer = null;
$.msg.close(layIndex); return $.msg.success(ret.msg, 3, function () {
return $.msg.success(ret.msg, 3), false; layer.close(layIndex);
}), false;
} }
}); });
}); });