diff --git a/application/index/controller/Wap.php b/application/index/controller/Wap.php index 7f42da31e..51fffa192 100644 --- a/application/index/controller/Wap.php +++ b/application/index/controller/Wap.php @@ -67,6 +67,9 @@ class Wap extends BasicWechat { } $pay = &load_wechat('pay'); $options = PayService::createWechatPayJsPicker($pay, $this->openid, $order_no, 1, 'JSAPI支付测试'); + if ($options === false) { + $options = ['code' => 3, 'msg' => "创建支付失败,{$pay->errMsg}[$pay->errCode]"]; + } return json($options); case 'reset': session('pay-test-order-no', null); diff --git a/application/index/view/wap.payjs.html b/application/index/view/wap.payjs.html index 9afa31a38..ebc83f36d 100644 --- a/application/index/view/wap.payjs.html +++ b/application/index/view/wap.payjs.html @@ -17,7 +17,7 @@
订单号:13412341234