src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Impl/SnsMessageValidator.php
public function validateMessage(Message $snsMessage)
    {
        switch($snsMessage->getMandatoryField("SignatureVersion")) {
        case "1":
            $this->_verifySignatureWithVersionOneAlgorithm($snsMessage);
            break;
        default:
            throw new OffAmazonPaymentsNotifications_InvalidMessageException(
                "Error with signature verification - " .
                "unable to handle signature version " .
                $snsMessage->getMandatoryField("SignatureVersion")
            );
        }
    }
public function validateMessage(Message $snsMessage)
    {
        switch($snsMessage->getMandatoryField("SignatureVersion")) {
        case "1":
            $this->_verifySignatureWithVersionOneAlgorithm($snsMessage);
            break;
        default:
            throw new OffAmazonPaymentsNotifications_InvalidMessageException(
                "Error with signature verification - " .
                "unable to handle signature version " .
                $snsMessage->getMandatoryField("SignatureVersion")
            );
        }
    }
public function validateMessage ( Message $ snsMessage ) { switch ( $ snsMessage -> getMandatoryField ( "SignatureVersion" ) ) { case "1" : $ this -> _verifySignatureWithVersionOneAlgorithm ( $ snsMessage ) ; break ; default : throw new OffAmazonPaymentsNotifications_InvalidMessageException ( "Error with signature verification - " . "unable to handle signature version " . $ snsMessage -> getMandatoryField ( "SignatureVersion" ) ) ; } }
Validate that the given sns message is valid
defined as being signed by Amazon and that the
signature matches the message contents

@param Message $snsMessage sns message to check

@throws OffAmazonPaymentsNotifications_InvalidMessageException if the
validation
fails

@return void
Validate that the given sns message is valid defined as being signed by Amazon and that the signature matches the message contents