|
|
|
|
@ -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);
|
|
|
|
|
|