protected function validateResponseOnError(PaymentTransaction $paymentTransaction, Response $response)
    {
        $allowedTypes = array(static::$successResponseType, 'error', 'validation-error');

        if (!in_array($response->getType(), $allowedTypes))
        {
            throw new ValidationException("Unknown response type '{$response->getType()}'");
        }

        $this->validateClientId($paymentTransaction, $response);
    }
protected function validateResponseOnError(PaymentTransaction $paymentTransaction, Response $response)
    {
        $allowedTypes = array(static::$successResponseType, 'error', 'validation-error');

        if (!in_array($response->getType(), $allowedTypes))
        {
            throw new ValidationException("Unknown response type '{$response->getType()}'");
        }

        $this->validateClientId($paymentTransaction, $response);
    }
protected function validateResponseOnError ( PaymentTransaction $ paymentTransaction , Response $ response ) { $ allowedTypes = array ( static :: $ successResponseType , 'error' , 'validation-error' ) ; if ( ! in_array ( $ response -> getType ( ) , $ allowedTypes ) ) { throw new ValidationException ( "Unknown response type '{$response->getType()}'" ) ; } $ this -> validateClientId ( $ paymentTransaction , $ response ) ; }
Validates response before payment transaction updating
if payment transaction is not processing or approved

@param       PaymentTransaction      $paymentTransaction     Payment transaction
@param       Response                $response               Response for validating
Validates response before payment transaction updating if payment transaction is not processing or approved