I'm developing a website that needs to communicate with the payment service and this is done by them sending an XML file through a post
variable to a receiver file that has to be created to get this information.
I'm using this but I cant get it to work right:
$xml_post = file_get_contents('php://input');
$xml=simplexml_load_file($xml_post);
foreach($xml->children() as $child){
$body .= $child->getName() . ": " . $child . "<br>";
}
I need to get the information into variables. Here is an example of the XML that I need to recieve:
<?xml version='1.0' encoding='ISO-8859-1'?>
<notification>
<notificationtype>1</notificationtype>
<operations>
<operation>
<type>1</type>
<id>00214</id>
</operation>
</operations>
</notification>