コード例 #1
0
 /**
  * @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;
 }
コード例 #2
0
 /**
  * @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;
 }