6
0
Fork 0

修复微信支付BUG

release
李静 2021-12-18 13:41:06 +08:00
parent 62981ea357
commit e5fe6a135a
1 changed files with 5 additions and 3 deletions

View File

@ -9,8 +9,10 @@ use EasyWeChat\Payment\Application;
class WeChatPayService 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_JSAPI = 'JSAPI'; // JSAPI支付
public const TRADE_TYPE_APP = 'APP'; // App支付 public const TRADE_TYPE_APP = 'APP'; // App支付
public const TRADE_TYPE_NATIVE = 'NATIVE'; // Native支付 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( throw new WeChatPayException(
sprintf( sprintf(
'[%s] %s', '[%s] %s',