From e5fe6a135a1f6076d23a613f03a4b5c6940e7047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=9D=99?= Date: Sat, 18 Dec 2021 13:41:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BE=AE=E4=BF=A1=E6=94=AF?= =?UTF-8?q?=E4=BB=98BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/WeChatPayService.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Services/WeChatPayService.php b/app/Services/WeChatPayService.php index 87ef6542..0f9b22c5 100644 --- a/app/Services/WeChatPayService.php +++ b/app/Services/WeChatPayService.php @@ -9,8 +9,10 @@ use EasyWeChat\Payment\Application; class WeChatPayService { - // 小程序交易类型 - // https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=4_2 + /** + * 小程序交易类型 + * https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=4_2 + */ public const TRADE_TYPE_JSAPI = 'JSAPI'; // JSAPI支付 public const TRADE_TYPE_APP = 'APP'; // App支付 public const TRADE_TYPE_NATIVE = 'NATIVE'; // Native支付 @@ -69,7 +71,7 @@ class WeChatPayService ); } - if (data_get($result, 'err_code') !== 'SUCCESS') { + if (data_get($result, 'result_code') !== 'SUCCESS') { throw new WeChatPayException( sprintf( '[%s] %s',