From 8a52346425197e0ebbe96dfce341da2716274866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=8A=80=E6=9C=AF=E8=80=81=E8=83=A1?= <1094551889@qq.com> Date: Wed, 11 Dec 2024 16:23:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=94=AF=E4=BB=98=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E9=80=BB=E8=BE=91=EF=BC=8C=E6=A0=B8=E5=AF=B9=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/model/Order.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/model/Order.php b/app/model/Order.php index aa310d7..8726210 100644 --- a/app/model/Order.php +++ b/app/model/Order.php @@ -17,6 +17,7 @@ class Order extends BaseModel { $my_time = time(); $channel = self::setChannel($data['pid'], $data['type']); + if(!$channel) return false; $new_order = [ // 订单号 'order_id' => self::createOrderID('H'), @@ -124,6 +125,7 @@ class Order extends BaseModel foreach ($channel_infos as $key => $value) { $check_wx = preg_match('/^wxpay\d+#/i', $value->channel); $check_ali = preg_match('/^alipay\d+#/i', $value->channel); + $channel_info = null; if ($check_wx && $type === 'wxpay') { $channel_info = $channel_infos[$key]; break; @@ -138,6 +140,7 @@ class Order extends BaseModel break; } } + if(!$channel_info) return []; // 选取收款通道 $patt = PayAccount::find($channel_info->account_id); $channel = ['aid' => $channel_info->account_id, 'cid' => $channel_info->id, 'patt' => $patt->getData('pattern')];