weizong song 5 years ago
parent ace4f27882
commit 7da696fea4

@ -114,17 +114,20 @@ class Refund extends SoftDeletesModel
$this->increment("try_times"); $this->increment("try_times");
try { try {
$result = $CommonUtilPub->xmlToArray($result); $result = $CommonUtilPub->xmlToArray($result);
dump($this->toArray(),"退款失败",$inputObj,$result);
if ($result["result_code"] == "SUCCESS") { if ($result["result_code"] == "SUCCESS") {
dump("退款成功");
$this->update([ $this->update([
"payment_serial" => $result["refund_id"], "payment_serial" => $result["refund_id"],
"paid_at" => date("Y-m-d H:i:s") "paid_at" => date("Y-m-d H:i:s")
]); ]);
} else { } else {
dump("退款失败");
if ($result["err_code"] == "NOTENOUGH") { if ($result["err_code"] == "NOTENOUGH") {
$this->decrement("try_times"); $this->decrement("try_times");
} }
} }
dump($this->toArray(),$inputObj,$result);
} catch (\Exception $exception) { } catch (\Exception $exception) {
$msg = "在线退款失败,原因:" . $exception->getMessage(); $msg = "在线退款失败,原因:" . $exception->getMessage();
Log::info($msg); Log::info($msg);

Loading…
Cancel
Save