From c23be217f4372ef91993f0d65b72076cbfd70f6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=9D=99?= Date: Fri, 25 Feb 2022 11:39:44 +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=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/Payment/WxpayService.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/Services/Payment/WxpayService.php b/app/Services/Payment/WxpayService.php index b9639e12..3ea9f928 100644 --- a/app/Services/Payment/WxpayService.php +++ b/app/Services/Payment/WxpayService.php @@ -2,7 +2,6 @@ namespace App\Services\Payment; -use App\Enums\PayWay; use App\Enums\WxpayTradeType; use App\Exceptions\WeChatPayException; use EasyWeChat\Factory; @@ -39,8 +38,8 @@ class WxpayService $this->validateResult($result, $params); return match ($params['trade_type']) { - PayWay::WxpayApp => $app->jssdk->appConfig($result['prepay_id']), - PayWay::WxpayH5 => Arr::only($result, ['mweb_url']), + WxpayTradeType::App->value => $app->jssdk->appConfig($result['prepay_id']), + WxpayTradeType::H5->value => Arr::only($result, ['mweb_url']), default => $app->jssdk->bridgeConfig($result['prepay_id'], false), }; }