From 1d4a83f7b274380852d5b22e46d85e540bb80e5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Wed, 15 Feb 2023 18:57:02 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=A8=8B=E5=BA=8F=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E3=80=91=E4=BC=98=E5=8C=96=E6=94=AF=E4=BB=98=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/common.php | 60 ++++++++++++++------------------------------ 1 file changed, 19 insertions(+), 41 deletions(-) diff --git a/crmeb/app/common.php b/crmeb/app/common.php index 9498e7c8e..f832f7329 100644 --- a/crmeb/app/common.php +++ b/crmeb/app/common.php @@ -34,23 +34,23 @@ if (!function_exists('get_pay_type')) { */ function get_pay_type(string $payType) { - $allinPay = (int)sys_config('allin_pay_status') == 1; - - //微信支付没有开启,通联支付开启,用户访问端在小程序或者公众号的时候,使用通联微信H5支付 - if ($payType == PayServices::WEIXIN_PAY) { - $wechat_pay_type = (int)sys_config('wechat_pay_type', 0); - if ($wechat_pay_type == 1 && $allinPay && (request()->isRoutine() || request()->isWechat())) { - $payType = PayServices::ALLIN_PAY; - } - } - - //支付宝没有开启,通联支付开了,用户使用支付宝支付,并且在app端访问的时候,使用通联app支付宝支付 - if ($payType == PayServices::ALIAPY_PAY) { - $alipay_pay_type = (int)sys_config('alipay_pay_type', 0); - if ($alipay_pay_type == 1 && $allinPay && request()->isApp()) { - $payType = PayServices::ALLIN_PAY; - } - } +// $allinPay = (int)sys_config('allin_pay_status') == 1; +// +// //微信支付没有开启,通联支付开启,用户访问端在小程序或者公众号的时候,使用通联微信H5支付 +// if ($payType == PayServices::WEIXIN_PAY) { +// $wechat_pay_type = (int)sys_config('wechat_pay_type', 0); +// if ($wechat_pay_type == 1 && $allinPay && (request()->isRoutine() || request()->isWechat())) { +// $payType = PayServices::ALLIN_PAY; +// } +// } +// +// //支付宝没有开启,通联支付开了,用户使用支付宝支付,并且在app端访问的时候,使用通联app支付宝支付 +// if ($payType == PayServices::ALIAPY_PAY) { +// $alipay_pay_type = (int)sys_config('alipay_pay_type', 0); +// if ($alipay_pay_type == 1 && $allinPay && request()->isApp()) { +// $payType = PayServices::ALLIN_PAY; +// } +// } return $payType; } @@ -65,18 +65,7 @@ if (!function_exists('is_wechat_pay')) { */ function is_wecaht_pay() { - $wechat_pay_type = (int)sys_config('wechat_pay_type', 0); - $wechatPay = (int)sys_config('pay_weixin_open') == 1; - $allinPay = (int)sys_config('allin_pay_status') == 1; - - if ($wechat_pay_type == 0 && $wechatPay) { - return true; - } elseif ($wechat_pay_type == 1 && $allinPay) { - if ((request()->isRoutine() || request()->isWechat())) { - return true; - } - } - return false; + return (int)sys_config('pay_weixin_open') == 1; } } @@ -89,18 +78,7 @@ if (!function_exists('is_ali_pay')) { */ function is_ali_pay() { - $alipay_pay_type = (int)sys_config('alipay_pay_type', 0); - $aliPay = (int)sys_config('ali_pay_status') == 1; - $allinPay = (int)sys_config('allin_pay_status') == 1; - - if ($alipay_pay_type == 0 && $aliPay) { - return true; - } elseif ($alipay_pay_type == 1 && $allinPay) { - if (request()->isApp()) { - return true; - } - } - return false; + return (int)sys_config('ali_pay_status') == 1; } }