checkVerify()) { $this->message('提现验证失败或验证已过期', yzWebUrl("withdraw.records", ['id' => $resultData['id']]), 'error'); } $result = (new PayedService($this->withdrawModel))->confirmPay(); if ($result == true) { $this->withdrawModel->update(['pay_way'=>Withdraw::WITHDRAW_WITH_MANUAL]); //线下手动打款后更改提现记录途径 return $this->successJson('确认打款成功'); } return $this->errorJson('确认打款失败,请刷新重试'); } public function validatorWithdrawModel($withdrawModel) { if ($withdrawModel->status != Withdraw::STATUS_AUDIT && $withdrawModel->status != Withdraw::STATUS_PAYING) { throw new ShopException('状态错误,不符合打款规则!'); } } /** * 打款验证 * @return bool */ private function checkVerify() { $set = Setting::getByGroup('pay_password')['withdraw_verify'] ?: []; if (empty($set) || empty($set['is_phone_verify'])) { return true; } $verify = Session::get('withdraw_verify'); //没获取到 if ($verify && $verify >= time()) { return true; } return false; } }