@param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
@param \Generated\Shared\Transfer\ComputopApiHeaderPaymentTransfer $computopApiHeaderPayment

@return \Spryker\Shared\Kernel\Transfer\TransferInterface
960057
public function request(
        QuoteTransfer $quoteTransfer,
        ComputopApiHeaderPaymentTransfer $computopApiHeaderPayment
    ): TransferInterface {
        $requestData = $this
            ->mapper
            ->buildRequest($quoteTransfer, $computopApiHeaderPayment);

        return $this->sendRequest($requestData);
    }
1039521
public function authorizePayment(OrderTransfer $orderTransfer)
    {
        $paymentEntity = $this->getPaymentEntity($orderTransfer->getIdSalesOrder());
        $paymentMethodMapper = $this->getPaymentMethodMapper($paymentEntity);
        $requestContainer = $paymentMethodMapper->mapPaymentToAuthorization($paymentEntity, $orderTransfer);
        $requestContainer = $this->prepareOrderItems($orderTransfer, $requestContainer);
        $requestContainer = $this->prepareOrderShipment($orderTransfer, $requestContainer);
        $requestContainer = $this->prepareOrderDiscount($orderTransfer, $requestContainer);
        $responseContainer = $this->performAuthorizationRequest($paymentEntity, $requestContainer);

        $responseMapper = new AuthorizationResponseMapper();
        $responseTransfer = $responseMapper->getAuthorizationResponseTransfer($responseContainer);

        return $responseTransfer;
    }
476700
public function getDataSubArray(QuoteTransfer $quoteTransfer, ComputopApiRequestTransfer $requestTransfer): array
    {
        $dataSubArray[ComputopApiConfig::MERCHANT_ID] = $requestTransfer->getMerchantId();
        $dataSubArray[ComputopApiConfig::TRANS_ID] = $requestTransfer->getTransId();
        $dataSubArray[ComputopApiConfig::ORDER_DESC] = $requestTransfer->getOrderDesc();
        $dataSubArray[ComputopApiConfig::AMOUNT] = $requestTransfer->getAmount();
        $dataSubArray[ComputopApiConfig::CURRENCY] = $requestTransfer->getCurrency();
        $dataSubArray[ComputopApiConfig::MAC] = $this->computopApiService->generateEncryptedMac($requestTransfer);
        $dataSubArray[ComputopApiConfig::PRODUCT_NAME] = $this->config->getCrifProductName();
        $dataSubArray[ComputopApiConfig::CUSTOMER_ID] = $quoteTransfer->getCustomer()->getCustomerReference();
        $dataSubArray[ComputopApiConfig::LEGAL_FORM] = $this->config->getCrifLegalForm();
        $dataSubArray[ComputopApiConfig::FIRST_NAME] = $quoteTransfer->getShippingAddress()->getFirstName();
        $dataSubArray[ComputopApiConfig::LAST_NAME] = $quoteTransfer->getShippingAddress()->getLastName();
        $dataSubArray[ComputopApiConfig::ADDRESS_STREET] = $quoteTransfer->getShippingAddress()->getAddress1();
        $dataSubArray[ComputopApiConfig::ADDRESS_STREET_NR] = $quoteTransfer->getShippingAddress()->getAddress2();
        $dataSubArray[ComputopApiConfig::ADDRESS_ADDITIONAL] = $quoteTransfer->getShippingAddress()->getAddress3();
        $dataSubArray[ComputopApiConfig::ADDRESS_CITY] = $quoteTransfer->getShippingAddress()->getCity();
        $dataSubArray[ComputopApiConfig::ADDR_ZIP] = $quoteTransfer->getShippingAddress()->getZipCode();
        $dataSubArray[ComputopApiConfig::ADDR_EMAIL] = $quoteTransfer->getCustomer()->getEmail();
        $dataSubArray[ComputopApiConfig::PHONE] = $quoteTransfer->getShippingAddress()->getPhone();

        return $dataSubArray;
    }
155353
public function getOptions(AbstractTransfer $quoteTransfer)
    {
        return [
            DirectDebitSubForm::OPTION_BANK_COUNTRIES => $this->getBankCountries(),
            DirectDebitSubForm::OPTION_BANK_ACCOUNT_MODE => $this->getBankAccountModes(),
        ];
    }
1158296
protected function getResponseTransfer(array $response): ComputopApiReverseResponseTransfer
    {
        $computopApiResponseTransfer = new ComputopApiReverseResponseTransfer();
        $computopApiResponseTransfer->setHeader(
            $this->computopApiService->extractResponseHeader($response, $this->config->getReverseMethodName())
        );
        //optional fields
        $computopApiResponseTransfer->setAId($this->computopApiService->getResponseValue($response, ComputopApiConfig::A_ID));
        $computopApiResponseTransfer->setTransactionId($this->computopApiService->getResponseValue($response, ComputopApiConfig::TRANSACTION_ID));
        $computopApiResponseTransfer->setCodeExt($this->computopApiService->getResponseValue($response, ComputopApiConfig::CODE_EXT));
        $computopApiResponseTransfer->setErrorText($this->computopApiService->getResponseValue($response, ComputopApiConfig::ERROR_TEXT));
        $computopApiResponseTransfer->setRefNr($this->computopApiService->getResponseValue($response, ComputopApiConfig::REF_NR));

        return $computopApiResponseTransfer;
    }
379388
public function getDataSubArray(ComputopApiRequestTransfer $computopApiRequestTransfer): array
    {
        $dataSubArray = parent::getDataSubArray($computopApiRequestTransfer);
        $dataSubArray[ComputopApiConfig::EVENT_TOKEN] = ComputopApiConfig::EVENT_TOKEN_AUTHORIZE;
        $dataSubArray[ComputopApiConfig::CAPTURE] = ComputopApiConfig::CAPTURE_MANUAL;

        return $dataSubArray;
    }
794281
protected function getPayonePaymentTransfer(QuoteTransfer $quoteTransfer, $paymentSelection)
    {
        $method = 'get' . ucfirst($paymentSelection);
        $payonePaymentTransfer = $quoteTransfer->getPayment()->$method();

        return $payonePaymentTransfer;
    }
323515
protected function savePayment(PayonePaymentTransfer $paymentTransfer)
    {
        $payment = new SpyPaymentPayone();
        $payment->fromArray(($paymentTransfer->toArray()));

        if ($payment->getReference() === null) {
            $orderEntity = $payment->getSpySalesOrder();
            $payment->setReference($this->config->generatePayoneReference($paymentTransfer, $orderEntity));
        }

        $payment->save();

        return $payment;
    }
1038182
public function getPlaintextMac(ComputopApiRequestTransfer $requestTransfer): string
    {
        $macDataArray = [
            $requestTransfer->getPayId(),
            $requestTransfer->requireTransId()->getTransId(),
            $requestTransfer->requireMerchantId()->getMerchantId(),
            $requestTransfer->requireAmount()->getAmount(),
            $requestTransfer->requireCurrency()->getCurrency(),
        ];

        return implode($this->config->getMacSeparator(), $macDataArray);
    }
38874
private function getQuotePaymentInfoInstance($quote)
    {
        return $this->quotePaymentInfoInstance ?:
            $this->quotePaymentInfoInstance = $quote->getPayment()->getMethodInstance()->getInfoInstance();
    }
1372077
protected function setPayonePayment(Request $request, QuoteTransfer $quoteTransfer, $paymentSelection)
    {
        $payonePaymentTransfer = $this->getPayonePaymentTransfer($quoteTransfer, $paymentSelection);

        $paymentDetailTransfer = new PaymentDetailTransfer();
        // get it from quotaTransfer
        $paymentDetailTransfer->setAmount($quoteTransfer->getTotals()->getGrandTotal());
        $paymentDetailTransfer->setCurrency($this->getCurrency());
        if ($paymentSelection === PaymentTransfer::PAYONE_CREDIT_CARD) {
            $paymentDetailTransfer->setPseudoCardPan($payonePaymentTransfer->getPseudocardpan());
        } elseif ($paymentSelection === PaymentTransfer::PAYONE_E_WALLET) {
            $paymentDetailTransfer->setType($payonePaymentTransfer->getWallettype());
        } elseif ($paymentSelection === PaymentTransfer::PAYONE_DIRECT_DEBIT) {
            $paymentDetailTransfer->setBankCountry($payonePaymentTransfer->getBankcountry());
            $paymentDetailTransfer->setBankAccount($payonePaymentTransfer->getBankaccount());
            $paymentDetailTransfer->setBankCode($payonePaymentTransfer->getBankcode());
            $paymentDetailTransfer->setBic($payonePaymentTransfer->getBic());
            $paymentDetailTransfer->setIban($payonePaymentTransfer->getIban());
            $paymentDetailTransfer->setMandateIdentification($payonePaymentTransfer->getMandateIdentification());
            $paymentDetailTransfer->setMandateText($payonePaymentTransfer->getMandateText());
        } elseif ($paymentSelection === PaymentTransfer::PAYONE_EPS_ONLINE_TRANSFER
            || $paymentSelection === PaymentTransfer::PAYONE_INSTANT_ONLINE_TRANSFER
            || $paymentSelection === PaymentTransfer::PAYONE_GIROPAY_ONLINE_TRANSFER
            || $paymentSelection === PaymentTransfer::PAYONE_IDEAL_ONLINE_TRANSFER
            || $paymentSelection === PaymentTransfer::PAYONE_POSTFINANCE_EFINANCE_ONLINE_TRANSFER
            || $paymentSelection === PaymentTransfer::PAYONE_POSTFINANCE_CARD_ONLINE_TRANSFER
            || $paymentSelection === PaymentTransfer::PAYONE_PRZELEWY24_ONLINE_TRANSFER
            || $paymentSelection === PaymentTransfer::PAYONE_BANCONTACT_ONLINE_TRANSFER
        ) {
            $paymentDetailTransfer->setType($payonePaymentTransfer->getOnlineBankTransferType());
            $paymentDetailTransfer->setBankCountry($payonePaymentTransfer->getBankCountry());
            if ($paymentSelection === PaymentTransfer::PAYONE_BANCONTACT_ONLINE_TRANSFER) {
                $paymentDetailTransfer->setBankCountry($quoteTransfer->getBillingAddress()->getIso2Code());
            }
            $paymentDetailTransfer->setBankAccount($payonePaymentTransfer->getBankAccount());
            $paymentDetailTransfer->setBankCode($payonePaymentTransfer->getBankCode());
            $paymentDetailTransfer->setBankBranchCode($payonePaymentTransfer->getBankBranchCode());
            $paymentDetailTransfer->setBankCheckDigit($payonePaymentTransfer->getBankCheckDigit());
            $paymentDetailTransfer->setBankGroupType($payonePaymentTransfer->getBankGroupType());
            $paymentDetailTransfer->setIban($payonePaymentTransfer->getIban());
            $paymentDetailTransfer->setBic($payonePaymentTransfer->getBic());
        } elseif ($paymentSelection == PaymentTransfer::PAYONE_CASH_ON_DELIVERY) {
            $shippingProvider = $quoteTransfer->getShipment()->getMethod()->getCarrierName();
            $paymentDetailTransfer->setShippingProvider($shippingProvider);
        }

        $quoteTransfer->getPayment()->setPayone(new PayonePaymentTransfer());
        $quoteTransfer->getPayment()->getPayone()->setReference(uniqid('TX1'));
        $quoteTransfer->getPayment()->getPayone()->setPaymentDetail($paymentDetailTransfer);
        $quoteTransfer->getPayment()->getPayone()->setPaymentMethod($quoteTransfer->getPayment()->getPaymentMethod());
    }
829244
public function setStockTransfer(\Flowcode\ShopBundle\Entity\StockTransfer $stockTransfer = null)
    {
        $this->stockTransfer = $stockTransfer;

        return $this;
    }
1154630
public function sendConsumerScoreRequest(QuoteTransfer $quoteTransfer): ConsumerScoreResponseTransfer
    {
        $requestContainer = $this->riskCheckMapper->mapConsumerScoreCheck($quoteTransfer);

        $response = $this->executionAdapter->sendRequest($requestContainer);

        $responseContainer = $this->riskCheckFactory->createConsumerScoreResponseContainer();
        $responseContainer->init($response);

        $consumerScoreResponseTransfer = new ConsumerScoreResponseTransfer();
        $consumerScoreResponseTransfer->setStatus($responseContainer->getStatus());

        if (!$responseContainer->isError()) {
            $consumerScoreResponseTransfer->setScore($responseContainer->getScore());
            $consumerScoreResponseTransfer->setScoreValue($responseContainer->getScorevalue());

            return $consumerScoreResponseTransfer;
        }

        $consumerScoreResponseTransfer->setCustomerMessage($responseContainer->getCustomermessage());

        return $consumerScoreResponseTransfer;
    }
458936
public function mapAddressCheck(QuoteTransfer $quoteTransfer): ContainerInterface
    {
        /** @var \SprykerEco\Zed\Payone\Business\Api\Request\Container\AddressCheckContainer $container */
        $container = $this->riskCheckFactory->createAddressCheckContainer();
        $container = $this->mapDefaultContainerParams($container);

        $container->setFirstName($quoteTransfer->getBillingAddress()->getFirstName());
        $container->setLastName($quoteTransfer->getBillingAddress()->getLastName());
        $container->setCompany($quoteTransfer->getBillingAddress()->getCompany());
        $container->setCountry($quoteTransfer->getBillingAddress()->getIso2Code());
        $container->setStreetName($quoteTransfer->getBillingAddress()->getAddress1());
        $container->setStreetNumber($quoteTransfer->getBillingAddress()->getAddress2());
        $container->setZip($quoteTransfer->getBillingAddress()->getZipCode());
        $container->setCity($quoteTransfer->getBillingAddress()->getCity());
        $container->setAddressCheckType($this->payoneConfig->getAddressCheckType());

        return $container;
    }
74918
public function checkCondition(QuoteTransfer $quoteTransfer, CheckoutResponseTransfer $checkoutResponseTransfer): bool
    {
        return $this->getFacade()->checkoutConditionalAvailabilityPingPreCondition($quoteTransfer, $checkoutResponseTransfer);
    }
637633
protected function createPaymentTransfer(OrderTransfer $orderTransfer): ComputopApiRequestTransfer
    {
        $computopApiRequestTransfer = parent::createPaymentTransfer($orderTransfer);
        $computopApiRequestTransfer->setCapture(
            $this->getCaptureType(ComputopApiConfig::PAYMENT_METHOD_PAY_NOW)
        );
        $computopApiRequestTransfer->setOrderDesc($this->getOrderDesc($this->computopApiService, $orderTransfer));

        return $computopApiRequestTransfer;
    }
1133233
public function performCaptureRequest(
        OrderTransfer $orderTransfer,
        ComputopApiHeaderPaymentTransfer $computopApiHeaderPayment
    ): ComputopApiCaptureResponseTransfer {
        return $this
            ->getFactory()
            ->createCapturePaymentRequest()
            ->request($orderTransfer, $computopApiHeaderPayment);
    }