From 7da696fea4ff433e68568afbd8a71175b408ec4e Mon Sep 17 00:00:00 2001 From: weizong song Date: Thu, 20 May 2021 09:52:27 +0800 Subject: [PATCH] up --- app/Models/Refund.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Models/Refund.php b/app/Models/Refund.php index 6c451a7..7291c6e 100755 --- a/app/Models/Refund.php +++ b/app/Models/Refund.php @@ -114,17 +114,20 @@ class Refund extends SoftDeletesModel $this->increment("try_times"); try { $result = $CommonUtilPub->xmlToArray($result); - dump($this->toArray(),"退款失败",$inputObj,$result); + if ($result["result_code"] == "SUCCESS") { + dump("退款成功"); $this->update([ "payment_serial" => $result["refund_id"], "paid_at" => date("Y-m-d H:i:s") ]); } else { + dump("退款失败"); if ($result["err_code"] == "NOTENOUGH") { $this->decrement("try_times"); } } + dump($this->toArray(),$inputObj,$result); } catch (\Exception $exception) { $msg = "在线退款失败,原因:" . $exception->getMessage(); Log::info($msg);