/**
  * @param \Generated\Shared\Transfer\ZeroPaymentAuthorizationTransfer $authorizationTransfer
  * @return \Generated\Shared\Transfer\ZeroPaymentTransfer
  */
 protected function createPaymentTransfer(ZeroPaymentAuthorizationTransfer $authorizationTransfer)
 {
     $zeroPaymentTransfer = new ZeroPaymentTransfer();
     $zeroPaymentTransfer->setFkSalesOrder($authorizationTransfer->getOrder()->getIdSalesOrder());
     $isZeroGrandTotal = $this->isZeroGrandTotal($authorizationTransfer);
     $zeroPaymentTransfer->setIsSuccess($isZeroGrandTotal);
     if (!$isZeroGrandTotal) {
         $zeroPaymentTransfer->setErrorMessage(ZeroPaymentConstants::ERROR_MESSAGE_GRAND_TOTAL_NOT_ZERO);
     }
     return $zeroPaymentTransfer;
 }
 /**
  * @param \Orm\Zed\ZeroPayment\Persistence\PavZeroPayment $zeroPaymentEntity
  * @return \Generated\Shared\Transfer\ZeroPaymentTransfer
  */
 public function entityToTransfer(PavZeroPayment $zeroPaymentEntity)
 {
     $transfer = new ZeroPaymentTransfer();
     $transfer->fromArray($zeroPaymentEntity->toArray(), true);
     return $transfer;
 }