src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Impl/SnsMessageValidator.php
private function _verifySignatureWithVersionOneAlgorithm(Message $snsMessage)
    {      
        $result = $this->_verifySignature->verifySignatureIsCorrect(
            $this->_constructSignatureFromSnsMessage($snsMessage),
            base64_decode($snsMessage->getMandatoryField("Signature")),
            $snsMessage->getMandatoryField("SigningCertURL")
        );
        
        if (!$result) {
            throw new OffAmazonPaymentsNotifications_InvalidMessageException(
                "Unable to match signature from remote server: signature of " .
                $this->_constructSignatureFromSnsMessage($snsMessage) . 
                " , SigningCertURL of " . 
                $snsMessage->getMandatoryField("SigningCertURL") . 
                " , SignatureOf " . 
                $snsMessage->getMandatoryField("Signature")
            );
        }
    }
private function _verifySignatureWithVersionOneAlgorithm(Message $snsMessage)
    {      
        $result = $this->_verifySignature->verifySignatureIsCorrect(
            $this->_constructSignatureFromSnsMessage($snsMessage),
            base64_decode($snsMessage->getMandatoryField("Signature")),
            $snsMessage->getMandatoryField("SigningCertURL")
        );
        
        if (!$result) {
            throw new OffAmazonPaymentsNotifications_InvalidMessageException(
                "Unable to match signature from remote server: signature of " .
                $this->_constructSignatureFromSnsMessage($snsMessage) . 
                " , SigningCertURL of " . 
                $snsMessage->getMandatoryField("SigningCertURL") . 
                " , SignatureOf " . 
                $snsMessage->getMandatoryField("Signature")
            );
        }
    }
private function _verifySignatureWithVersionOneAlgorithm ( Message $ snsMessage ) { $ result = $ this -> _verifySignature -> verifySignatureIsCorrect ( $ this -> _constructSignatureFromSnsMessage ( $ snsMessage ) , base64_decode ( $ snsMessage -> getMandatoryField ( "Signature" ) ) , $ snsMessage -> getMandatoryField ( "SigningCertURL" ) ) ; if ( ! $ result ) { throw new OffAmazonPaymentsNotifications_InvalidMessageException ( "Unable to match signature from remote server: signature of " . $ this -> _constructSignatureFromSnsMessage ( $ snsMessage ) . " , SigningCertURL of " . $ snsMessage -> getMandatoryField ( "SigningCertURL" ) . " , SignatureOf " . $ snsMessage -> getMandatoryField ( "Signature" ) ) ; } }
Implement the version one signature verification algorithm

@param Message $snsMessage sns message

@throws OffAmazonPaymentsNotifications_InvalidMessageException if the
validation
fails

@return void
Implement the version one signature verification algorithm