src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Impl/XmlNotificationParser.php
private static function _getXmlFromIpnMessage(Message $ipnMsg)
    {        
        // Try and load the notification data as xml
        $notificationData = $ipnMsg->getMandatoryField("NotificationData");
        
        $dom = new DOMDocument();
        try {
            $dom->loadXML($notificationData);
        } catch (Exception $ex) {
            throw new OffAmazonPaymentsNotifications_InvalidMessageException(
                "Error with ipn message - NotificationData field does not contain xml, " .
                "contents: " . $notificationData
            );
        }
        
        return $dom->documentElement;
    }
private static function _getXmlFromIpnMessage(Message $ipnMsg)
    {        
        // Try and load the notification data as xml
        $notificationData = $ipnMsg->getMandatoryField("NotificationData");
        
        $dom = new DOMDocument();
        try {
            $dom->loadXML($notificationData);
        } catch (Exception $ex) {
            throw new OffAmazonPaymentsNotifications_InvalidMessageException(
                "Error with ipn message - NotificationData field does not contain xml, " .
                "contents: " . $notificationData
            );
        }
        
        return $dom->documentElement;
    }
private static function _getXmlFromIpnMessage ( Message $ ipnMsg ) { // Try and load the notification data as xml $ notificationData = $ ipnMsg -> getMandatoryField ( "NotificationData" ) ; $ dom = new DOMDocument ( ) ; try { $ dom -> loadXML ( $ notificationData ) ; } catch ( Exception $ ex ) { throw new OffAmazonPaymentsNotifications_InvalidMessageException ( "Error with ipn message - NotificationData field does not contain xml, " . "contents: " . $ notificationData ) ; } return $ dom -> documentElement ; }
Convert the xml message from the ipn payload
into an xml document

@param Message $ipnMsg ipn message

@throws OffAmazonPaymentsNotifications_InvalidMessageException

@return XmlElement xml document element
Convert the xml message from the ipn payload into an xml document