- Модуль: voximplant
- Путь к файлу: ~/bitrix/modules/voximplant/classes/general/vi_documents.php
- Класс: CVoxImplantDocuments
- Вызов: CVoxImplantDocuments::GetUploadUrl
public function GetUploadUrl($country_code = 'RU', $address_type = null, $phone_category = null, $phone_region_code = null, $phone_region_id = null)
{
if($country_code == 'RU')
{
$params = $this->GetUploadData();
return 'https://verify.voximplant.com/verification_ru?account_id='.$params['ACCOUNT_ID'].'&admin_user_name='.$params['ADMIN_NAME'].'&verification_name='.$country_code.'&session_id='.$params['SESSION_ID'].'&vendor=bitrix';
}
else
{
$accessData = $this->GetUploadData();
if($accessData === false)
return false;
$params['account_id'] = $accessData['ACCOUNT_ID'];
$params['admin_user_name'] = $accessData['ADMIN_NAME'];
$params['session_id'] = $accessData['SESSION_ID'];
$params['country_code'] = $country_code;
if($address_type)
$params['address_type'] = $address_type;
if($phone_category)
$params['phone_category'] = $phone_category;
if($phone_region_code)
$params['phone_region_code'] = $phone_region_code;
if($phone_region_id)
$params['phone_region_id'] = $phone_region_id;
$language = BitrixMainContext::getCurrent()->getLanguage();
if(in_array($language, array('ru', 'de', 'en')))
$params['_lang'] = $language;
else
$params['_lang'] = 'en';
$query = http_build_query($params);
if(defined('VOXIMPLANT_DEVAPI') && VOXIMPLANT_DEVAPI === true)
$result = 'http://devapi.voximplant.com:8093/?'.$query;
else
$result = 'https://verify.voximplant.com/additional/?'.$query;
return $result;
}
}