src/TransactionService.php
private function processFallback(CreditCardTransaction $transaction, Response $response)
    {
        if (!$response->getStatusCollection()->hasStatusCodes(['500.1072', '500.1073', '500.1074'])) {
            return $response;
        }

        $transaction->setThreeD(false);
        $requestBody = $this->requestMapper->map($transaction);
        $endpoint = $this->config->getBaseUrl() . $transaction->getEndpoint();
        $responseContent = $this->sendPostRequest($endpoint, $requestBody);

        return $this->responseMapper->map($responseContent, $transaction);
    }
private function processFallback(CreditCardTransaction $transaction, Response $response)
    {
        if (!$response->getStatusCollection()->hasStatusCodes(['500.1072', '500.1073', '500.1074'])) {
            return $response;
        }

        $transaction->setThreeD(false);
        $requestBody = $this->requestMapper->map($transaction);
        $endpoint = $this->config->getBaseUrl() . $transaction->getEndpoint();
        $responseContent = $this->sendPostRequest($endpoint, $requestBody);

        return $this->responseMapper->map($responseContent, $transaction);
    }
private function processFallback ( CreditCardTransaction $ transaction , Response $ response ) { if ( ! $ response -> getStatusCollection ( ) -> hasStatusCodes ( [ '500.1072' , '500.1073' , '500.1074' ] ) ) { return $ response ; } $ transaction -> setThreeD ( false ) ; $ requestBody = $ this -> requestMapper -> map ( $ transaction ) ; $ endpoint = $ this -> config -> getBaseUrl ( ) . $ transaction -> getEndpoint ( ) ; $ responseContent = $ this -> sendPostRequest ( $ endpoint , $ requestBody ) ; return $ this -> responseMapper -> map ( $ responseContent , $ transaction ) ; }
If specific status codes which indicate an error during the credit card enrollment check are found in response,
we do a fallback from a 3-D to an SSL credit card transaction

@param CreditCardTransaction $transaction
@param Response $response
@throws UnconfiguredPaymentMethodException
@throws MandatoryFieldMissingException
@throws \RuntimeException
@throws MalformedResponseException
@throws \InvalidArgumentException
@return Response
If specific status codes which indicate an error during the credit card enrollment check are found in response we do a fallback from a 3 - D to an SSL credit card transaction