@param \Generated\Shared\Transfer\AdyenApiResponseTransfer $responseTransfer
@param array $response

@return \Generated\Shared\Transfer\AdyenApiResponseTransfer
177699
protected function updateResponseTransfer(AdyenApiResponseTransfer $responseTransfer, array $response): AdyenApiResponseTransfer
    {
        $apiResponseTransfer = (new AdyenApiPaymentDetailsResponseTransfer())->fromArray($response, true);

        return $responseTransfer->setPaymentDetailsResponse($apiResponseTransfer);
    }
627113
public static function fromArray(array $response)
    {
        $body = isset($response['body']) ? $response['body'] : null;

        $gzip = isset($response['headers']['Content-Type'])
            && strpos($response['headers']['Content-Type'], 'application/x-gzip') !== false;

        $binary = isset($response['headers']['Content-Transfer-Encoding'])
            && $response['headers']['Content-Transfer-Encoding'] == 'binary';

        // Base64 decode when binary
        if ($gzip || $binary) {
            $body = base64_decode($response['body']);
        }

        return new static(
            isset($response['status']) ? $response['status'] : 200,
            isset($response['headers']) ? $response['headers'] : array(),
            $body
        );
    }
143469
public static function setHeadersFromBrowserResponse(Response $response,
            MessageInterface $browserResponse)
    {
        $heasers_resp = Utils::getHeadersFromBrowserResponse($browserResponse);
        foreach($heasers_resp as $key => $value)
        {
            if(strtolower($key) !== "transfer-encoding"){
                $response->headers->set($key, $value);
            }
        }
    }
960057
public function request(
        QuoteTransfer $quoteTransfer,
        ComputopApiHeaderPaymentTransfer $computopApiHeaderPayment
    ): TransferInterface {
        $requestData = $this
            ->mapper
            ->buildRequest($quoteTransfer, $computopApiHeaderPayment);

        return $this->sendRequest($requestData);
    }
757995
public function transformEarly(Request $request, SymfonyResponse $response)
    {
        $responseModel = $response->getContent();

        if (!$responseModel instanceof ResponseModelInterface) {
            $responseModel = $this->responseModelFactory->createFromContent(
                $response
            );
        }

        $responseModel->setReturnStackTrace($this->isDebug());
        $response->setStatusCode($responseModel->getStatusCode());
        $this->forceStatusCodeHttpOK($request, $response, $responseModel);
        $response = $this->createSerializedResponse(
            $request,
            $response,
            $responseModel
        );

        return $response;
    }
1055374
public function transform($response)
    {
        $binding = $this->getBinding($response);

        return $this->adapter->transform($response, $binding->resolveTransformer(), $binding, $this->getRequest());
    }
360581
protected function getResponseTransfer(array $response): ComputopApiInquireResponseTransfer
    {
        $computopApiResponseTransfer = new ComputopApiInquireResponseTransfer();
        $computopApiResponseTransfer->fromArray($response, true);
        $computopApiResponseTransfer->setHeader(
            $this->computopApiService->extractResponseHeader($response, $this->config->getInquireMethodName())
        );
        $computopApiResponseTransfer->setAmountAuth($this->computopApiService->getResponseValue($response, ComputopApiConfig::AMOUNT_AUTH));
        $computopApiResponseTransfer->setAmountCap($this->computopApiService->getResponseValue($response, ComputopApiConfig::AMOUNT_CAP));
        $computopApiResponseTransfer->setAmountCred($this->computopApiService->getResponseValue($response, ComputopApiConfig::AMOUNT_CRED));
        $computopApiResponseTransfer->setLastStatus($this->computopApiService->getResponseValue($response, ComputopApiConfig::LAST_STATUS));
        //set custom options
        $computopApiResponseTransfer->setIsAuthLast($this->isAuthLast($computopApiResponseTransfer));
        $computopApiResponseTransfer->setIsCapLast($this->isCapLast($computopApiResponseTransfer));
        $computopApiResponseTransfer->setIsCredLast($this->isCredLast($computopApiResponseTransfer));

        return $computopApiResponseTransfer;
    }
1151082
protected function validateRequestTransfer(AdyenApiRequestTransfer $adyenApiRequestTransfer): void
    {
        $adyenApiRequestTransfer->requireTechnicalCancelRequest();

        $adyenApiRequestTransfer
            ->getTechnicalCancelRequest()
            ->requireMerchantAccount()
            ->requireOriginalReference();
    }
53665
public function request(
        OrderTransfer $orderTransfer,
        ComputopApiHeaderPaymentTransfer $computopApiHeaderPayment
    ): TransferInterface {
        $requestData = $this
            ->getMethodMapper($this->getPaymentMethodFromOrder($orderTransfer))
            ->buildRequest($orderTransfer, $computopApiHeaderPayment);

        return $this->sendRequest($requestData);
    }
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()));
    }
599123
public function getCaptureResponseTransfer(CaptureResponseContainer $responseContainer)
    {
        $result = new CaptureResponseTransfer();
        $clearing = new ClearingTransfer();
        $creditor = new CreditorTransfer();
        $baseResponse = new BaseResponseTransfer();

        // Fill clearing transfer
        $clearing->setBankAccountHolder($responseContainer->getClearingBankaccountholder());
        $clearing->setBankCountry($responseContainer->getClearingBankcountry());
        $clearing->setBankAccount($responseContainer->getClearingBankaccount());
        $clearing->setBankCode($responseContainer->getClearingBankcode());
        $clearing->setBankIban($responseContainer->getClearingBankiban());
        $clearing->setBankBic($responseContainer->getClearingBankbic());
        $clearing->setBankCity($responseContainer->getClearingBankcity());
        $clearing->setBankName($responseContainer->getClearingBankname());
        $clearing->setLegalNote($responseContainer->getClearingLegalnote());
        $clearing->setDate($responseContainer->getClearingDate());
        $clearing->setDueDate($responseContainer->getClearingDuedate());
        $clearing->setReference($responseContainer->getClearingReference());
        $clearing->setInstructionNote($responseContainer->getClearingInstructionnote());
        $clearing->setAmount($responseContainer->getClearingAmount());

        // Fill creditor transfer
        $creditor->setIdentifier($responseContainer->getCreditorIdentifier());
        $creditor->setName($responseContainer->getCreditorName());
        $creditor->setStreet($responseContainer->getCreditorStreet());
        $creditor->setZip($responseContainer->getCreditorZip());
        $creditor->setCity($responseContainer->getCreditorCity());
        $creditor->setCountry($responseContainer->getCreditorCountry());
        $creditor->setEmail($responseContainer->getCreditorEmail());

        // Fill base response transfer
        $baseResponse->setErrorCode($responseContainer->getErrorcode());
        $baseResponse->setErrorMessage($responseContainer->getErrormessage());
        $baseResponse->setCustomerMessage($responseContainer->getCustomermessage());
        $baseResponse->setStatus($responseContainer->getStatus());
        $baseResponse->setRawResponse($responseContainer->getRawResponse());

        // Set plain attributes
        $result->setTxid($responseContainer->getTxid());
        $result->setSettleAccount($responseContainer->getSettleaccount());
        $result->setMandateIdentification($responseContainer->getMandateIdentification());

        // Set aggregated transfers
        $result->setClearing($clearing);
        $result->setCreditor($creditor);
        $result->setBaseResponse($baseResponse);

        return $result;
    }
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;
    }
115857
protected function validateRequestTransfer(AdyenApiRequestTransfer $adyenApiRequestTransfer): void
    {
        $adyenApiRequestTransfer->requirePaymentMethodsRequest();

        $adyenApiRequestTransfer
            ->getPaymentMethodsRequest()
            ->requireMerchantAccount()
            ->requireChannel()
            ->requireAmount();

        $adyenApiRequestTransfer
            ->getPaymentMethodsRequest()
            ->getAmount()
            ->requireCurrency()
            ->requireValue();
    }
847686
protected function validateRequestTransfer(AdyenApiRequestTransfer $adyenApiRequestTransfer): void
    {
        $adyenApiRequestTransfer->requirePaymentDetailsRequest();

        $adyenApiRequestTransfer
            ->getPaymentDetailsRequest()
            ->requirePaymentData()
            ->requireDetails();
    }
73810
public function getData(AbstractTransfer $quoteTransfer): QuoteTransfer
    {
        if ($quoteTransfer->getPayment() === null) {
            $paymentTransfer = new PaymentTransfer();
            $paymentTransfer->setPayone(new PayonePaymentTransfer());
            $quoteTransfer->setPayment($paymentTransfer);
        }

        return $quoteTransfer;
    }
137337
private function decodeResponse(ResponseInterface $response): ResponseInterface
    {
        $response = $this->decodeOnEncodingHeader('Transfer-Encoding', $response);

        if ($this->useContentEncoding) {
            $response = $this->decodeOnEncodingHeader('Content-Encoding', $response);
        }

        return $response;
    }
1117045
public function performReverseRequest(
        OrderTransfer $orderTransfer,
        ComputopApiHeaderPaymentTransfer $computopApiHeaderPayment
    ): ComputopApiReverseResponseTransfer {
        return $this
            ->getFactory()
            ->createReversePaymentRequest()
            ->request($orderTransfer, $computopApiHeaderPayment);
    }