getFile(), $e->getLine(), $e->getMessage() ])); self::setError($e->getMessage()); return $e->getMessage(); } } private static function deposit($orderSn, $extra = []){ $order = DepositOrder::where('sn', $orderSn)->findOrEmpty()->toArray(); // 增加用户累计充值金额及用户余额 Coach::update([ 'deposit' => ['inc',$order['order_amount']], ],['id'=>$order['relation_id']]); // 记录账户流水 CoachAccountLogLogic::add($order['relation_id'], CoachAccountLogEnum::DEPOSIT,CoachAccountLogEnum::RECHARGE_INC_DEPOSIT,CoachAccountLogEnum::INC, $order['order_amount'], $order['sn']); // 更新充值订单状态 DepositOrder::update([ 'transaction_id' => $extra['transaction_id'] ?? '', 'pay_status' => PayEnum::ISPAID, 'pay_time' => time(), ],['id'=>$order['id']]); } }