From 92a09b602e27b5b72cb8e137ff5b4b92b8817269 Mon Sep 17 00:00:00 2001 From: weizong song Date: Thu, 21 Dec 2023 12:26:58 +0800 Subject: [PATCH 1/3] up --- app/Libs/WxMicroPay.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Libs/WxMicroPay.class.php b/app/Libs/WxMicroPay.class.php index 3c8960f..85673d2 100644 --- a/app/Libs/WxMicroPay.class.php +++ b/app/Libs/WxMicroPay.class.php @@ -95,6 +95,10 @@ class WxMicroPay extends WxPayCommon public function manualQuery(Recharge $recharge) { $query_result = $this->orderQuery($recharge->serial); + if (!isset($query_result["trade_state"])) { + dump($query_result); + return false; + } if ($query_result["trade_state"] == "SUCCESS") { if (!$recharge->paid_at) { $transaction_id = $query_result["transaction_id"]; From ed13a60f22b8c3590a4cdce5cb673b8ab92c374d Mon Sep 17 00:00:00 2001 From: weizong song Date: Thu, 21 Dec 2023 12:27:54 +0800 Subject: [PATCH 2/3] up --- app/Libs/WxMicroPay.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Libs/WxMicroPay.class.php b/app/Libs/WxMicroPay.class.php index 85673d2..bbafe79 100644 --- a/app/Libs/WxMicroPay.class.php +++ b/app/Libs/WxMicroPay.class.php @@ -96,7 +96,7 @@ class WxMicroPay extends WxPayCommon { $query_result = $this->orderQuery($recharge->serial); if (!isset($query_result["trade_state"])) { - dump($query_result); + dump($recharge,$query_result); return false; } if ($query_result["trade_state"] == "SUCCESS") { From 2089b19060c98c09e12ff6acb676a87d65cef9ee Mon Sep 17 00:00:00 2001 From: weizong song Date: Thu, 21 Dec 2023 12:29:38 +0800 Subject: [PATCH 3/3] up --- app/Console/Commands/SyncWeixinRechargeState.php | 2 +- app/Libs/WxMicroPay.class.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Console/Commands/SyncWeixinRechargeState.php b/app/Console/Commands/SyncWeixinRechargeState.php index 4465196..14a29ac 100644 --- a/app/Console/Commands/SyncWeixinRechargeState.php +++ b/app/Console/Commands/SyncWeixinRechargeState.php @@ -42,7 +42,7 @@ class SyncWeixinRechargeState extends Command { $threshold = 5; $offset_seconds = 40; //支付发起后多少秒开始轮询 - $due_minutes = 500; //支付发起后第一次开始轮询的时间往后延迟5分钟后不再轮询 + $due_minutes = 30; //支付发起后第一次开始轮询的时间往后延迟5分钟后不再轮询 $last_id = cache("last_sync_weixin_recharge_id", 0); DB::enableQueryLog(); diff --git a/app/Libs/WxMicroPay.class.php b/app/Libs/WxMicroPay.class.php index bbafe79..a0ae1a2 100644 --- a/app/Libs/WxMicroPay.class.php +++ b/app/Libs/WxMicroPay.class.php @@ -96,7 +96,6 @@ class WxMicroPay extends WxPayCommon { $query_result = $this->orderQuery($recharge->serial); if (!isset($query_result["trade_state"])) { - dump($recharge,$query_result); return false; } if ($query_result["trade_state"] == "SUCCESS") {