<?xml version="1.0" encoding="utf-8"?>
<Request>
<Authentication>
<Login>mybill</Login>
<TransactionID>1</TransactionID>
<MethodName>UserRegistration</MethodName>
<Hash>f5bb0c8de146c67b88babbf4e6584cc0</Hash>
</Authentication>
<Parameters>
…
Here will be the list of parameters required by the command.
…
</Parameters>
</Request>
<?xml version="1.0" encoding="utf-8"?>
<Return>
<Error>
<ErrorCode>ClientEMail_NotUnique</ErrorCode>
<ErrorMessage></ErrorMessage>
</Error>
<Status>1</Status>
</Return>
<?xml version="1.0" encoding="utf-8"?>
<Request>
<Authentication>
<Login>mybill</Login>
<TransactionID>3</TransactionID>
<MethodName>Account</MethodName>
<Hash>f5bb0c8de146c67b88babbf4e6584cc0</Hash>
</Authentication>
</Request>
<?xml version="1.0" encoding="utf-8"?>
<Return>
<Status>2</Status>
<Error/>
<Account>100000.00</Account>
</Return>
<?xml version="1.0" encoding="utf-8"?>
<Request>
<Authentication>
<Login>mybill</Login>
<TransactionID>3</TransactionID>
<MethodName>GetOrderStatus</MethodName>
<Hash>f5bb0c8de146c67b88babbf4e6584cc0</Hash>
</Authentication>
<Parameters>
<BasketID>100</BasketID>
</Parameters>
</Request>
<?xml version="1.0" encoding="utf-8"?>
<Return>
<Status>2</Status>
<Error/>
<OrderStatus>
<ID>4</ID>
<Status>Delivered</Status>
<Changed>2020-11-12 22:23:24</Changed>
</OrderStatus>
</Return>
<?xml version="1.0" encoding="utf-8"?>
<Request>
<Authentication>
<Login>mybill</Login>
<TransactionID>3</TransactionID>
<MethodName>GetCategories</MethodName>
<Hash>f5bb0c8de146c67b88babbf4e6584cc0</Hash>
</Authentication>
</Request>
<?xml version="1.0" encoding="utf-8"?>
<Return>
<Status>2</Status>
<Error/>
<Categories>
<Category id="1">
<name>TVs</name>
<Params>
<Param id="1">
<name>Screen size</name>
<value id="1" unit="inch">27</value>
<value id="2" unit="inch">32</value>
<value id="3" unit="inch">54</value>
</Param>
</Params>
</Category>
<Category id="2">
<name>Door fitting</name>
<Params>
<Param id="2">
<name>Цвет</name>
<value id="5">White</value>
<value id="7">Bronze</value>
<value id="8">Black</value>
<value id="8">Silver</value>
</Param>
<Param id="3">
<name>Country</name>
<value id="21">Russia</value>
<value id="22">Italy</value>
</Param>
</Params>
</Category>
</Categories>
</Return>
<?xml version="1.0" encoding="utf-8"?>
<Request>
<Authentication>
<Login>mybill</Login>
<TransactionID>3</TransactionID>
<MethodName>GetProduct</MethodName>
<Hash>f5bb0c8de146c67b88babbf4e6584cc0</Hash>
</Authentication>
<Parameters>
<Products>
<Product>136311798</Product>
<Product>27665879</Product>
</Products>
</Parameters>
</Request>
<?xml version="1.0" encoding="utf-8"?>
<Request>
<Authentication>
<Login>mybill</Login>
<TransactionID>3</TransactionID>
<MethodName>GetProduct</MethodName>
<Hash>2cfc084ba11ac55371a9a24cc34121e7</Hash>
</Authentication>
<Parameters>
<Limit offset="0" row_count="500"/>
<Categories>
<Category>83</Category>
<Category>87</Category>
</Categories>
<Params>
<Param>5305</Param>
<Param>1807</Param>
</Params>
</Parameters>
</Request>
<?xml version="1.0" encoding="utf-8"?>
<Return>
<Error>
<ErrorCode>NotFoundProducts</ErrorCode>
<ErrorMessage>No products matching the request were found</ErrorMessage>
</Error>
<Status>1</Status>
</Return>
<?xml version="1.0" encoding="utf-8"?>
<Request>
<Authentication>
<Login>mybill</Login>
<TransactionID>3</TransactionID>
<MethodName>GetDeliveryVariants</MethodName>
<Hash>f5bb0c8de146c67b88babbf4e6584cc0</Hash>
</Authentication>
<Parameters>
<BasketID>356</BasketID>
<DeliveryAddress>
</DeliveryAddress>
<Products>
<Product>
<Id>1</Id>
<Quantity>1</Quantity>
</Product>
<Product>
<Id>2</Id>
<Quantity>5</Quantity>
</Product>
</Products>
</Parameters>
</Request>
<?xml version="1.0" encoding="utf-8"?>
<Return>
<Status>2</Status>
<Error/>
<BasketID>333</BasketID>
<Deliverys>
<Logistician>
<Id>4</Id>
<DeliveryVariants>
<DeliveryVariant>
<Id>1</Id>
<Name>Online download or receipt by SMS</Name>
<Type>Electronically</Type>
<Price>0</Price>
<EstimatedDeliveryTime>1</EstimatedDeliveryTime>
</DeliveryVariant>
</DeliveryVariants>
<Products>
<ProductId>1</ProductID>
<ProductId>2</ProductID>
</Products>
</Logistician>
</Deliverys>
</Return>
<?xml version="1.0" encoding="utf-8"?>
<Request>
<Authentication>
<Login>mybill</Login>
<TransactionID>1547203965</TransactionID>
<MethodName>MakeOrder</MethodName>
<Hash>f5bb0c8de146c67b88babbf4e6584cc0</Hash>
</Authentication>
<Parameters>
<BasketID>123</BasketID>
<OrderID>100</OrderID>
<DeliveryAddress>
<Street>Krasivaya str.</Street>
<Building1>1</Building1>
<Room>10</Room>
</DeliveryAddress>
<User>
<FirstName>Ivan</FirstName>
<MiddleName>Ivanovich</MiddleName>
<LastName>Ivanov</LastName>
<Email>ivanov@email.ru</Email>
<Phone>+79091231234</Phone>
</User>
<Products>
<Product>
<Id>69713</Id>
<DeliveryID>1</DeliveryID>
</Product>
<Product>
<Id>55711</Id>
<DeliveryID>3</DeliveryID>
</Product>
</Products>
</Parameters>
</Request>
<?xml version="1.0" encoding="utf-8"?>
<Return>
<Status>2</Status>
<Error/>
</Return>
<?xml version="1.0" encoding="utf-8"?>
<Request>
<Authentication>
<Login>mybill</Login>
<TransactionID>1547203965</TransactionID>
<MethodName>ConfirmOrder</MethodName>
<Hash>162e20c14cae620c27fee4c63afaa927</Hash>
</Authentication>
<Parameters>
<BasketID>333</BasketID>
</Parameters>
</Request>
<?xml version="1.0" encoding="utf-8"?>
<Return>
<Status>2</Status>
<Error/>
</Return>
<?php
$transationID = time();
$login = 'Login';
$password = 'Password';
$method = 'MakeOrder';
$url = 'http://mybill.your_utl.ru/…/' . $method;
$hash = md5($transationID . $method . $login . $password);
$request = <<<XML
<?xml version="1.0" encoding="utf-8"?>
<Request>
<Authentication>
<Login>{$login}</Login>
<TransactionID>{$transationID}</TransactionID>
<MethodName>{$method}</MethodName>
<Hash>{$hash}</Hash>
</Authentication>
<Parameters>
<OrderID>363</OrderID>
<User>
<FirstName>Ivanov</FirstName>
<MiddleName>Ivan</MiddleName>
<LastName>Ivanovich</LastName>
<Email>ivanov@email.ru</Email>
<Phone>+79091231234</Phone>
</User>
<DeliveryAddress>
<ZipCode>249034</ZipCode>
<Region>Kaluga region</Region>
<City>Kaluga</City>
<Address>apt.1, Krasivaya str.</Address>
</DeliveryAddress>
<Products>
<Product>
<Id>1</Id>
<DeliveryID>1</DeliveryID>
<Quantity>2</Quantity>
</Product>
<Product>
<Id>2</Id>
<DeliveryID>1</DeliveryID>
<Quantity>1</Quantity>
</Product>
</Products>
</Parameters>
</Request>
XML;
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
'Content-Type: text/xml; charset=utf-8',
'Content-Length: ' . strlen($request))
);
curl_setopt($curl, CURLOPT_POSTFIELDS, $request);
$response = curl_exec($curl);
curl_close($curl);