caseManagement = $caseManagement; $this->signifydGateway = $signifydGateway; $this->logger = $logger; $this->caseRepository = $caseRepository; $this->orderGridUpdater = $orderGridUpdater; $this->orderStateService = $orderStateService; } /** * {@inheritdoc} */ public function createForOrder($orderId) { $case = $this->caseManagement->create($orderId); $this->orderGridUpdater->update($orderId); try { $caseId = $this->signifydGateway->createCase($orderId); } catch (GatewayException $e) { $this->logger->error($e->getMessage()); return true; } $case->setCaseId($caseId); $this->caseRepository->save($case); $this->orderStateService->updateByCase($case); return true; } }