We (my boss) would like to pull the payloadID and timestamp from incoming cXML orders for injection into our MySQL database. The code to inject the information is already complete and working, and I am able to pull information from tags and attributes within the XML, however I don't seem to be able to pull any information from within the <cXML> tag itself.
Here's an example of the cXML tag:
The XML is set up as follows:
<cXML payloadID="systemgeneratedpayloadid" timestamp="timestamp" version="1.2.021" xml:lang="en-US">
And here are some examples of how the information that works is pulled in the same function:
foreach($this->simpleXML as $url)
I have tried to pull the payloadID and timestamp like so without results:
$item = $url->OrderRequest->OrderRequestHeader['orderID']; #Attribute from tag
$NetworkID = $url->From->Credential->Identity; #XML data
Anyone have any suggestions? Your help would be greatly appreciated.
$item = $url->cXML['payloadID'];