Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: user1f787
Added: Sep 24, 2019 11:56 AM
Modified: Sep 24, 2019 11:58 AM
Views: 8
Tags: php
  1. <?php
  2. ini_set('display_errors', 1);
  3. try {
  4.     $xml = '<?xml version="1.0" encoding="utf-8"?>
  5.                <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  6.                  <soap:Body>
  7.                    <PaymentNotification xmlns="http://apilistener.envoyservices.com">
  8.                      <payment>
  9.                        <uniqueReference>ESDEUR11039872</uniqueReference>
  10.                        <epacsReference>74348dc0-cbf0-df11-b725-001ec9e61285</epacsReference>
  11.                        <postingDate>2010-11-15T15:19:45</postingDate>
  12.                        <bankCurrency>EUR</bankCurrency>
  13.                        <bankAmount>1.00</bankAmount>
  14.                        <appliedCurrency>EUR</appliedCurrency>
  15.                        <appliedAmount>1.00</appliedAmount>
  16.                        <countryCode>ES</countryCode>
  17.                        <bankInformation>Sean Wood</bankInformation>
  18.                  <merchantReference>ESDEUR11039872</merchantReference>
  19.                   </payment>
  20.                    </PaymentNotification>
  21.                  </soap:Body>
  22.                </soap:Envelope>';
  23.         $doc = new DOMDocument();
  24.         $doc->loadXML($xml);
  25.         echo $doc->getElementsByTagName('postingDate')->item(0)->nodeValue;
  26.         die;
  27. } catch (Exception $e) {
  28.  
  29. }
  30. ?>