diff --git a/app/controller/api/Recharge.php b/app/controller/api/Recharge.php index a78f8ec..465f9a4 100644 --- a/app/controller/api/Recharge.php +++ b/app/controller/api/Recharge.php @@ -93,16 +93,16 @@ class Recharge extends Base $this->log($m); $recharge = RechargeRepository::getInstance()->getModel()->where(["order_num" => $message['out_trade_no']])->lock(true)->find(); if (empty($recharge)) { - $this->log(sprintf("[微信支付回调][%s][%s]订单支付成功,但系统查无此订单 info:%s", date('Y-m-d H:i:s'), $message['out_trade_no'], $m), 'error'); + $this->log(sprintf("[微信支付回调][%s][%s]订单支付成功,但系统查无此订单", date('Y-m-d H:i:s'), $message['out_trade_no']), 'error'); return true;//订单不存在 } if ($recharge['state'] == RechargeModel::state_on) { - $this->log("订单已支付"); + $this->log("订单已支付". $message['out_trade_no']); return true;//订单已经支付 } $business = BusinessRepository::getInstance()->getModel()->where(["code" => $recharge['business_code']])->lock(true)->find(); if (empty($business)) { - $this->log(sprintf("[微信支付回调][%s][%s]订单支付成功,但商家不存在 info:%s", date('Y-m-d H:i:s'), $message['out_trade_no'], $m), 'error'); + $this->log(sprintf("[微信支付回调][%s][%s]订单支付成功,但商家不存在", date('Y-m-d H:i:s'), $message['out_trade_no']), 'error'); return true; } @@ -129,15 +129,15 @@ class Recharge extends Base ]); Db::commit(); //记录日志 - $this->log(sprintf("[微信支付回调][%s][%s]订单支付成功 info:%s", date('Y-m-d H:i:s'), $message['out_trade_no'], $m), 'info'); + $this->log(sprintf("[微信支付回调][%s][%s]订单支付成功-数据修改成功", date('Y-m-d H:i:s'), $message['out_trade_no']), 'info'); return true; } catch (RepositoryException $e) { Db::rollback(); - $this->log(sprintf("[微信支付回调][%s][%s]订单支付成功-修改订单状态失败-RepositoryException info:%s", date('Y-m-d H:i:s'), $message['out_trade_no'], $m), 'info'); + $this->log(sprintf("[微信支付回调][%s][%s]订单支付成功-修改订单状态失败-RepositoryException", date('Y-m-d H:i:s'), $message['out_trade_no']), 'info'); return $fail('Order status edit failed.'); } catch (\Exception $e) { Db::rollback(); - $this->log(sprintf("[微信支付回调][%s][%s]订单支付成功-修改订单状态失败-Exception info:%s", date('Y-m-d H:i:s'), $message['out_trade_no'], $m), 'info'); + $this->log(sprintf("[微信支付回调][%s][%s]订单支付成功-修改订单状态失败-Exception", date('Y-m-d H:i:s'), $message['out_trade_no']), 'info'); return $fail('Order status edit failed.'); }