I am new to php an XML. Plus I have gone through many threads on this topic here.
There might be a slight glitch, but I am not able to read this.
Here is what I am doing to read it as per one of the threads.
//parse xml string into SimpleXML objects
$returnxml = simplexml_load_string($result);
if ($returnxml === false) {
die('Error parsing Return XML');
}
//now we can loop through the xml structure
foreach ($returnxml->channel->item as $item) {
print $item->title;
}
I do not get anything using above code
Here is the actual [EXACT] XML response using CURL
<?xml version="1.0" encoding="ISO-8859-1"?>
<ncresponse
orderID="120130414021640"
PAYID="BESALDOM 516A65F5E5E"
STATUS="4"
NCSTATUS="0"
NCERROR=""
NCERRORPLUS="Your transaction has been submitted for processing."
ACCEPTANCE="BINF-"
IPCTY=""
CCCTY=""
IDUsager="7884TSMA"
/>
Next this is the CURL Code I am using, which looks fairly ok.
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $this->omnipayment_action_url);
curl_setopt($ch,CURLOPT_POST, count($myorder));
curl_setopt($ch,CURLOPT_POSTFIELDS, $flds);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
$result = curl_exec($ch);
curl_close($ch);
Thanks in advance, any help will be much appreciated...
$returnxml->channel- where do you see in the response channel ?