/** * @param string $errorReason * @param \Generated\Shared\Transfer\ZeroPaymentTransfer $zeroPaymentTransfer * @return \Generated\Shared\Transfer\ZeroPaymentResultCheckResponseTransfer */ protected function createErrorResponse($errorReason, ZeroPaymentTransfer $zeroPaymentTransfer = null) { $response = new ZeroPaymentResultCheckResponseTransfer(); $response->setIsSuccess(false); $response->setGeneralErrorMessage(ZeroPaymentConstants::ERROR_MESSAGE_GENERAL_ERROR); $response->setErrorReason($errorReason); $response->setZeroPayment($zeroPaymentTransfer); return $response; }
/** * @param \Generated\Shared\Transfer\ZeroPaymentResultCheckResponseTransfer $resultCheckResponse * @return \Generated\Shared\Transfer\CheckoutErrorTransfer */ protected function createCheckoutErrorTransfer(ZeroPaymentResultCheckResponseTransfer $resultCheckResponse) { $errorTransfer = new CheckoutErrorTransfer(); $errorTransfer->setMessage($resultCheckResponse->getGeneralErrorMessage()); return $errorTransfer; }