• Модуль: seo
  • Путь к файлу: ~/bitrix/modules/seo/lib/leadads/services/formvkontakte.php
  • Класс: BitrixSeoLeadAdsServicesFormVkontakte
  • Вызов: FormVkontakte::getCallbackConfirmationCode
protected function getCallbackConfirmationCode()
{
	$response = $this->getRequest()->send([
		'methodName' => 'leadads.callback.server.code.get',
		'parameters' => [
			'group_id' => $this->accountId,
		]
	]);

	if (!$response->isSuccess())
	{
		return new Error('Can not get confirmation code for Callback server.');
	}

	$responseData = $response->getData();

	return empty($responseData['code'])
			? new Error('Can not get confirmation code for Callback server.')
			: $responseData['code']
		;
}