From 4ca54aa7efe666922bc9b7248eeccdd92144bda6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Fri, 14 Apr 2017 18:04:56 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E4=BF=AE=E6=94=B9=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E6=94=AF=E4=BB=98demo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/index/controller/Wap.php | 1 + application/index/view/wap.payjs.html | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/application/index/controller/Wap.php b/application/index/controller/Wap.php index 51fffa192..96e14cbc2 100644 --- a/application/index/controller/Wap.php +++ b/application/index/controller/Wap.php @@ -70,6 +70,7 @@ class Wap extends BasicWechat { if ($options === false) { $options = ['code' => 3, 'msg' => "创建支付失败,{$pay->errMsg}[$pay->errCode]"]; } + $options['order_no'] = $order_no; 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 b73d98924..8f5648786 100644 --- a/application/index/view/wap.payjs.html +++ b/application/index/view/wap.payjs.html @@ -14,7 +14,7 @@

金额: 0.01元


-

订单号:13412341234

+


@@ -36,6 +36,7 @@ wx.ready(function () { $('[type="submit"]').on('click', function () { $.get('{:url("payjs")}', {'action': 'options'}, function (ret) { + $('.orderno').html('订单号:' + ret.order_no); if (ret.code && ret.code === 2) { $('#test').append(''); return $('[type="submit"]').remove();