Here is the code to construct XML using SimpleXML in PHP and send a request using Zend Framework's HTTP Client:
$xml = new \SimpleXMLElement('<request/>');
$xml->addChild(
'partner',
$this->credentials['aaa']);
$order = $xml->addChild('order');
$order->addAttribute('order_id', $orderId);
$order->addChild('status', $status);
$client = new \Zend_Http_Client();
$client->setUri('https://....');
$client->setRawData($xml->asXML(), 'text/xml');
$response = $client->request('POST');
Comments