jsonFactory->create(); try { $data = $this->parser->parse( (string)$this->getRequest()->getContent(), (array)$this->getRequest()->getParams() ); $paymentResult = $this->processor->process($data, false); return $result->setData([ 'success' => $paymentResult !== Processor::FAILURE, 'status' => $paymentResult, 'message' => $paymentResult === Processor::FAILURE ? (string)__('Payment was not completed: %1', $data['payment_details']) : '', ]); } catch (\Throwable $exception) { $this->logger->warning('Oceanpayment OnePage result was rejected', ['exception' => $exception]); $this->getResponse()->setHttpResponseCode(400); return $result->setData([ 'success' => false, 'status' => Processor::FAILURE, 'message' => (string)__('The payment result could not be verified.'), ]); } } }