@param \Generated\Shared\Transfer\PaymentMethodsTransfer $paymentMethodsTransfer
@param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer

@return \Generated\Shared\Transfer\PaymentMethodsTransfer
495439
public function filterPaymentMethods(PaymentMethodsTransfer $paymentMethodsTransfer, QuoteTransfer $quoteTransfer): PaymentMethodsTransfer
    {
        $availableMethods = $this->getAvailablePaymentMethods($quoteTransfer);

        $result = new ArrayObject();

        foreach ($paymentMethodsTransfer->getMethods() as $paymentMethod) {
            if ($this->isPaymentMethodPayone($paymentMethod) && !$this->isAvailable($paymentMethod, $availableMethods)) {
                continue;
            }
            $result->append($paymentMethod);
        }
        $paymentMethodsTransfer->setMethods($result);

        return $paymentMethodsTransfer;
    }
416670
public function getOptions(AbstractTransfer $quoteTransfer)
    {
        return [
            EpsOnlineTransferSubForm::OPTION_BANK_COUNTRIES => $this->getBankCountries(),
            EpsOnlineTransferSubForm::OPTION_BANK_GROUP_TYPES => $this->getBankGroupTypes(),
        ];
    }
73810
public function getData(AbstractTransfer $quoteTransfer): QuoteTransfer
    {
        if ($quoteTransfer->getPayment() === null) {
            $paymentTransfer = new PaymentTransfer();
            $paymentTransfer->setPayone(new PayonePaymentTransfer());
            $quoteTransfer->setPayment($paymentTransfer);
        }

        return $quoteTransfer;
    }
1148537
public function getInvoice(PayoneGetInvoiceTransfer $getInvoiceTransfer)
    {
        $responseContainer = new GetInvoiceResponseContainer();
        $paymentEntity = $this->findPaymentByInvoiceTitleAndCustomerId(
            $getInvoiceTransfer->getReference(),
            $getInvoiceTransfer->getCustomerId()
        );

        if ($paymentEntity) {
            /** @var \SprykerEco\Zed\Payone\Business\Payment\MethodMapper\Invoice $paymentMethodMapper */
            $paymentMethodMapper = $this->getRegisteredPaymentMethodMapper(PayoneApiConstants::PAYMENT_METHOD_INVOICE);
            $requestContainer = $paymentMethodMapper->mapGetInvoice($getInvoiceTransfer);
            $this->setStandardParameter($requestContainer);
            $rawResponse = $this->executionAdapter->sendRequest($requestContainer);
            $responseContainer->init($rawResponse);
        } else {
            $this->setAccessDeniedError($responseContainer);
        }

        $getInvoiceTransfer->setRawResponse($responseContainer->getRawResponse());
        $getInvoiceTransfer->setStatus($responseContainer->getStatus());
        $getInvoiceTransfer->setErrorCode($responseContainer->getErrorcode());
        $getInvoiceTransfer->setInternalErrorMessage($responseContainer->getErrormessage());

        return $getInvoiceTransfer;
    }
702629
protected function encryptRequestData(
        QuoteTransfer $quoteTransfer,
        ComputopApiRequestTransfer $requestTransfer
    ): array {
        return $this->computopApiService->getEncryptedArray(
            $this->getDataSubArray($quoteTransfer, $requestTransfer),
            $this->config->getBlowfishPass()
        );
    }
297422
protected function hydrateQuoteWithCustomer(
        QuoteTransfer $quoteTransfer,
        PayonePaypalExpressCheckoutGenericPaymentResponseTransfer $details
    ) {
        $customerEmail = $details->getEmail();
        $customerTransfer = new CustomerTransfer();
        $customerTransfer->setEmail($customerEmail);
        $customerTransfer = $this->customerClient->getCustomerByEmail($customerTransfer);

        if (!empty($customerTransfer->getFirstName())) {
            $quoteTransfer->setCustomer($customerTransfer);
            return $quoteTransfer;
        }
        $customerTransfer->setIsGuest(true);
        $customerTransfer->setFirstName($details->getShippingFirstName());
        $customerTransfer->setLastName($details->getShippingLastName());
        $customerTransfer->setCompany($details->getShippingCompany());
        $customerTransfer->setEmail($customerEmail);
        $quoteTransfer->setCustomer($customerTransfer);

        return $quoteTransfer;
    }
77340
public function expandTransfer(ProductListTransfer $productListTransfer): ProductListTransfer
    {
        $productListTransfer = $this->getFacade()
            ->expandProductListTransferWithProductListCustomerRelationTransfer($productListTransfer);

        return $productListTransfer;
    }
147942
public function filter(RabbitMqExchangeCollectionTransfer $rabbitMqExchangeCollectionTransfer)
    {
        $filteredRabbitMqExchangeCollectionTransfer = new RabbitMqExchangeCollectionTransfer();

        foreach ($rabbitMqExchangeCollectionTransfer->getRabbitMqExchanges() as $rabbitMqExchangeTransfer) {
            if (!$this->isBlacklisted($rabbitMqExchangeTransfer)) {
                $filteredRabbitMqExchangeCollectionTransfer->addRabbitMqExchange($rabbitMqExchangeTransfer);
            }
        }

        return $filteredRabbitMqExchangeCollectionTransfer;
    }
147458
public function generateReqIdFromQuoteTransfer(QuoteTransfer $quoteTransfer): string
    {
        return $this->generateReqId(
            $quoteTransfer->getTotals()->getHash(),
            $quoteTransfer->getCustomer()->getCustomerReference() ?? static::GUEST_CUSTOMER_REFERENCE
        );
    }
469668
public function checkoutConditionalAvailabilityPreCondition(QuoteTransfer $quoteTransfer, CheckoutResponseTransfer $checkoutResponseTransfer): bool
    {
        return $this->getFactory()
            ->createConditionalAvailabilityPreCondition()
            ->checkCondition($quoteTransfer, $checkoutResponseTransfer);
    }
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;
    }
494676
public function expandWithProductListCompanyRelationTransfer(ProductListTransfer $productListTransfer): ProductListTransfer
    {
        $productListCompanyRelationTransfer = new ProductListCompanyRelationTransfer();

        $productListCompanyRelationTransfer->setIdProductList($productListTransfer->getIdProductList());

        $productListCompanyRelationTransfer = $this->productListCompanyRelationReader
            ->getProductListCompanyRelation($productListCompanyRelationTransfer);

        $productListTransfer->setProductListCompanyRelation($productListCompanyRelationTransfer);

        return $productListTransfer;
    }
1005795
public function isAuthorizationRedirect(OrderTransfer $orderTransfer)
    {
        return $this->hasApiLogStatus(
            $orderTransfer,
            PayoneApiConstants::REQUEST_TYPE_AUTHORIZATION,
            PayoneApiConstants::RESPONSE_TYPE_REDIRECT
        );
    }
1041171
public function getHydratedQuote(
        QuoteTransfer $quoteTransfer,
        PayonePaypalExpressCheckoutGenericPaymentResponseTransfer $details
    ) {
        $quoteTransfer = $this->hydrateQuoteWithPayment($quoteTransfer);
        $quoteTransfer = $this->hydrateQuoteWithShipment($quoteTransfer);
        $quoteTransfer = $this->hydrateQuoteWithAddresses($quoteTransfer, $details);
        if (!$this->customerClient->isLoggedIn()) {
            $quoteTransfer = $this->hydrateQuoteWithCustomer($quoteTransfer, $details);
            $quoteTransfer->setIsGuestExpressCheckout(true);
        }
        return $this->calculationClient->recalculate($quoteTransfer);
    }
159531
public function sendAddressCheckRequest(QuoteTransfer $quoteTransfer): AddressCheckResponseTransfer
    {
        $requestContainer = $this->riskCheckMapper->mapAddressCheck($quoteTransfer);
        $response = $this->executionAdapter->sendRequest($requestContainer);

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

        $addressCheckResponseTransfer = new AddressCheckResponseTransfer();
        $addressCheckResponseTransfer->setStatus($responseContainer->getStatus());
        $addressCheckResponseTransfer->setStreetName($responseContainer->getStreetName());
        $addressCheckResponseTransfer->setStreetNumber($responseContainer->getStreetNumber());
        $addressCheckResponseTransfer->setZip($responseContainer->getZip());
        $addressCheckResponseTransfer->setCity($responseContainer->getCity());
        $addressCheckResponseTransfer->setSecStatus($responseContainer->getSecstatus());
        $addressCheckResponseTransfer->setPersonStatus($responseContainer->getPersonstatus());

        if ($responseContainer->getCustomermessage() !== null) {
            $addressCheckResponseTransfer->setCustomerMessage($responseContainer->getCustomermessage());
        }

        return $addressCheckResponseTransfer;
    }
1373955
public function checkCondition(QuoteTransfer $quoteTransfer, CheckoutResponseTransfer $checkoutResponse): bool
    {
        $dateTimeUntil = new \DateTimeImmutable();
        if (Environment::getInstance()->isDevelopment()) {
            $dateTimeUntil = new \DateTimeImmutable('2019-02-27 11:23:36');
        }

        $dateTimeFrom = $dateTimeUntil->modify('-1 hour');

        $result = $this->conditionalAvailabilityClient->ConditionalAvailabilityLastPingSearch($dateTimeFrom, $dateTimeUntil);

        $isPassed = $result->getTotalHits() > 0;

        if ($isPassed) {
            return true;
        }

        $this->addAvailabilityErrorToCheckoutResponse($checkoutResponse);

        return false;
    }
1238003
protected function createComputopApiRequestTransfer(QuoteTransfer $quoteTransfer): ComputopApiRequestTransfer
    {
        return (new ComputopApiRequestTransfer())
            ->setPayId('')
            ->setMerchantId($this->config->getMerchantId())
            ->setTransId($this->computopApiService->generateLimitedTransId($quoteTransfer, static::TRANS_ID_LIMIT))
            ->setAmount($quoteTransfer->getTotals()->getPriceToPay())
            ->setCurrency($quoteTransfer->getCurrency()->getCode())
            ->setOrderDesc($this->computopApiService->getDescriptionValue($quoteTransfer->getItems()->getArrayCopy()));
    }