From f24d5a6d2dca1ca5d0aba874ac7097c0a879cc8a Mon Sep 17 00:00:00 2001 From: "[ddwe]" Date: Wed, 29 Mar 2023 11:36:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E6=9D=A1=E4=BB=B6=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=A4=84=E7=90=86=E5=AF=BC=E8=87=B4=E7=9A=84=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Console/Commands/UsdtAddrGetList.php | 2 +- app/ServicePay/ApiOrderServices.php | 6 ++++++ app/ServicePay/UsdtWalletServices.php | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/UsdtAddrGetList.php b/app/Console/Commands/UsdtAddrGetList.php index 91af732..731572b 100644 --- a/app/Console/Commands/UsdtAddrGetList.php +++ b/app/Console/Commands/UsdtAddrGetList.php @@ -164,7 +164,7 @@ class UsdtAddrGetList extends Command */ public function updateTimeoutAddr(){ $allOrder = Order::where(['pay_type'=>'1017','usdt_addr_status'=>'0']) - ->where('order_at','<',date('Y-m-d H:i:s',strtotime("-20 minute")))->limit(100)->get(); + ->where('order_at','<',date('Y-m-d H:i:s',strtotime("-60 minute")))->limit(100)->get(); if(empty($allOrder)){ return; } diff --git a/app/ServicePay/ApiOrderServices.php b/app/ServicePay/ApiOrderServices.php index 0c1d848..25398b2 100644 --- a/app/ServicePay/ApiOrderServices.php +++ b/app/ServicePay/ApiOrderServices.php @@ -128,8 +128,14 @@ class ApiOrderServices //检查商户 $this->checkMerchant($request); + if (count(self::$errorArr) > 0) { + return $this->msg($this->errorFormat()); + } //检查签名 $this->checkSign($this->merchant, $request); + if (count(self::$errorArr) > 0) { + return $this->msg($this->errorFormat()); + } //通道检查 $this->checkGateway($request); if (count(self::$errorArr) > 0) { diff --git a/app/ServicePay/UsdtWalletServices.php b/app/ServicePay/UsdtWalletServices.php index de6ecbb..e0ba4d8 100644 --- a/app/ServicePay/UsdtWalletServices.php +++ b/app/ServicePay/UsdtWalletServices.php @@ -396,7 +396,7 @@ class UsdtWalletServices extends BasePay implements PayApiInterface private function getUstdAddr(){ DB::beginTransaction(); $addr = UsdtAddr::where('is_checked',1)->orderby('updated_at','asc')->first(); - if (!$addr){ + if (!empty($addr)){ $addr['is_checked'] = 0; $ret = $addr['addr']; $r = $addr->save();