Запрос на новую лицензию

<?php
$url = 'https://belrus.net/bxrequest.xml';

$command = '<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE belrus-b2b SYSTEM "order-template.dtd">
    <alwil-b2b>
        <order Renewal="No" Maintenance="3" CustomerType="Normal" DiscountDescription="Normal" ResellerOrderId="156">
            <new-customer CustomerName="Ivan Ivanov" Company="Home" Email="ivan@ivanov.me" Phone="+74129606010" Fax="" City="Moscow" Street="Lenina" ZIP="123123" State="Moscovskaya" Country="Russian Federation" />
            <product InternalId="xxx" Quantity="1"/>
        </order>
</alwil-b2b>';

$encoded[] = "user=DEALERACCOUNT";
$encoded[] = "pwd=DEALERPASSWORD";
$encoded[] = "command=".$command;
$encoded = implode("&", $encoded);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $encoded);
curl_setopt($curl, CURLOPT_TIMEOUT, 120);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
// Выполнение запроса и получения XML-ответа
$response_xml = curl_exec($curl);
curl_close($curl);

header('Content-type: text/xml');
echo $response_xml;

?>

Запрос на обновление

<?php
$url = 'https://belrus.net/bxrequest.xml';

$command = '<!DOCTYPE alwil-b2b SYSTEM "order-template.dtd">
	<alwil-b2b>
		<order Renewal="Yes" Maintenance="1" ResellerOrderId="157" CustomerType="Educational">
			<customer CustomerNo="0000000001" CustomerName="Ivan Ivanov" Company="Home" Email="ivan@ivanov.me" Phone="+74129606010" Fax="" City="Moscow" Street="Lenina" ZIP="123123" State="Moscovskaya" Country="Russian Federation" />
			<product InternalId="xxx" Quantity="3" PreviousLicenseId="faked-license-identifactor" />
		</order>
</alwil-b2b>';

$encoded[] = "user=DEALERACCOUNT";
$encoded[] = "pwd=DEALERPASSWORD";
$encoded[] = "command=".$command;
$encoded = implode("&", $encoded);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $encoded);
curl_setopt($curl, CURLOPT_TIMEOUT, 120);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
// Выполнение запроса и получения XML-ответа
$response_xml = curl_exec($curl);
curl_close($curl);

header('Content-type: text/xml');
echo $response_xml;

?>