input('order_pay_id'); /** * @var OrderPay $orderPay */ $orderPay = OrderPay::find($orderPayId); if (!isset($orderPay)) { throw new AppException("未找到该支付记录(id:{$orderPayId})"); } $process = $orderPay->currentProcess(); if (!isset($process)) { throw new AppException("未找到该流程(order_pay_id:{$orderPayId})"); } return $process; } /** * @return string */ protected function beforeStates() { return RemittanceFlow::STATE_WAIT_REMITTANCE; } /** * @return \Illuminate\Http\JsonResponse * @throws \Exception */ public function index() { $this->validate([ 'report_url' => 'required', 'amount' => 'numeric', ]); $this->toNextState(); return $this->successJson(); } }