private function post($url, $data = array(), $timeout = 3)
{
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, Helper::array2xml($data));
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
if (preg_match('#return_code#', $result)) {
$result = Helper::xml2array($result);
} else {
$result = array(['return_code' => 'SUCCESS', 'raw' => $result]);
}
return $result;
}