From 79911a28b54f7b63a14c1d070b931d6a7ef8d6f0 Mon Sep 17 00:00:00 2001 From: lingling <1077478963@qq.com> Date: Thu, 20 Feb 2025 22:25:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Utils/API/PaymentNew.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/Utils/API/PaymentNew.php b/app/Utils/API/PaymentNew.php index 17719ee..f1a4b8e 100644 --- a/app/Utils/API/PaymentNew.php +++ b/app/Utils/API/PaymentNew.php @@ -61,12 +61,16 @@ class PaymentNew { $url = "https://mdf.hr5688.com/api/createPaymentOrder"; $PaymentChannelId = 0; - if ($payeeBankName == "bKash") { + $banks = [strtoupper("bKash"), strtoupper("Nagad")]; + if (!in_array(strtoupper($payeeBankName), $banks)) { + return -1; + } + if (strtoupper($payeeBankName) == strtoupper("bKash")) { $PaymentChannelId = 34; - } else { + } + if (strtoupper($payeeBankName) == strtoupper("Nagad")) { $PaymentChannelId = 35; } - // Guzzle HTTP client $client = new Client(); // var_dump($orderId);