public function validateResponseCertificate()
    {
        $xmlResponse = $this->getLastRawResponse();

        $soapValidation = new SoapValidation($xmlResponse, $this->certificationBag->getServerCertificate());
        $validation =  $soapValidation->getValidationResult(); // Validates if the message is signed by Transbank

        if ($validation !== true) {
            $msg = 'Transbank response fails on the certificate signature validation. 
            Response does not comes from Transbank or the certificate expired.';
            LogHandler::log($msg, LoggerInterface::LEVEL_ERROR);

            throw new InvalidCertificateException($msg);
        }
    }
public function validateResponseCertificate()
    {
        $xmlResponse = $this->getLastRawResponse();

        $soapValidation = new SoapValidation($xmlResponse, $this->certificationBag->getServerCertificate());
        $validation =  $soapValidation->getValidationResult(); // Validates if the message is signed by Transbank

        if ($validation !== true) {
            $msg = 'Transbank response fails on the certificate signature validation. 
            Response does not comes from Transbank or the certificate expired.';
            LogHandler::log($msg, LoggerInterface::LEVEL_ERROR);

            throw new InvalidCertificateException($msg);
        }
    }
public function validateResponseCertificate ( ) { $ xmlResponse = $ this -> getLastRawResponse ( ) ; $ soapValidation = new SoapValidation ( $ xmlResponse , $ this -> certificationBag -> getServerCertificate ( ) ) ; $ validation = $ soapValidation -> getValidationResult ( ) ; // Validates if the message is signed by Transbank if ( $ validation !== true ) { $ msg = 'Transbank response fails on the certificate signature validation. 
            Response does not comes from Transbank or the certificate expired.' ; LogHandler :: log ( $ msg , LoggerInterface :: LEVEL_ERROR ) ; throw new InvalidCertificateException ( $ msg ) ; } }
Verifies the authenticity of the last SOAP response

@throws InvalidCertificateException
Verifies the authenticity of the last SOAP response