From c2ad6826a7ac945bff0b7feda89c1f8f9012a36e Mon Sep 17 00:00:00 2001 From: Anyon Date: Wed, 17 Jul 2019 11:30:02 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E4=BF=AE=E5=A4=8D=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0APi=E6=8E=88=E6=9D=83=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/wechat/service/WechatService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/wechat/service/WechatService.php b/application/wechat/service/WechatService.php index a1926974b..cc0f912df 100644 --- a/application/wechat/service/WechatService.php +++ b/application/wechat/service/WechatService.php @@ -124,7 +124,7 @@ class WechatService extends \We */ public static function instance($name, $type = 'WeChat', $config = []) { - if (in_array($type, ['WePay', 'AliPay']) || "{$type}{$name}" === 'WeChatPay') { + if (self::getType() === 'api' || in_array($type, ['WePay', 'AliPay']) || "{$type}{$name}" === 'WeChatPay') { if (class_exists($class = "\\{$type}\\" . ucfirst(strtolower($name)))) { return new $class(empty($config) ? self::config() : $config); } else {