src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Client.php
public function parseRawMessage($headers, $body)
    {
        // Is this json, is this
        // an sns message, do we have the fields we require
        $snsMessage = SnsMessageParser::parseNotification($headers, $body);
        
        // security validation - check that this message is
        // from amazon and that it has been signed correctly
        $this->_snsMessageValidator->validateMessage($snsMessage);
        
        // Convert to object - convert from basic class to object
        $ipnMessage = IpnNotificationParser::parseSnsMessage($snsMessage);
        return XmlNotificationParser::parseIpnMessage($ipnMessage);
    }
public function parseRawMessage($headers, $body)
    {
        // Is this json, is this
        // an sns message, do we have the fields we require
        $snsMessage = SnsMessageParser::parseNotification($headers, $body);
        
        // security validation - check that this message is
        // from amazon and that it has been signed correctly
        $this->_snsMessageValidator->validateMessage($snsMessage);
        
        // Convert to object - convert from basic class to object
        $ipnMessage = IpnNotificationParser::parseSnsMessage($snsMessage);
        return XmlNotificationParser::parseIpnMessage($ipnMessage);
    }
public function parseRawMessage ( $ headers , $ body ) { // Is this json, is this // an sns message, do we have the fields we require $ snsMessage = SnsMessageParser :: parseNotification ( $ headers , $ body ) ; // security validation - check that this message is // from amazon and that it has been signed correctly $ this -> _snsMessageValidator -> validateMessage ( $ snsMessage ) ; // Convert to object - convert from basic class to object $ ipnMessage = IpnNotificationParser :: parseSnsMessage ( $ snsMessage ) ; return XmlNotificationParser :: parseIpnMessage ( $ ipnMessage ) ; }
Converts a http POST body and headers into
a notification object

@param array  $headers post request headers
@param string $body    post request body, should be json

@throws OffAmazonPaymentsNotifications_InvalidMessageException

@return OffAmazonPaymentsNotifications_Notification
Converts a http POST body and headers into a notification object