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',