• Модуль: seo
  • Путь к файлу: ~/bitrix/modules/seo/lib/checkout/services/factory.php
  • Класс: BitrixSeoCheckoutServicesFactory
  • Вызов: Factory::createService
static function createService(string $type)
{
	$oauthService = null;

	if ($type === AccountYandex::TYPE_CODE)
	{
		$oauthService = new AccountYandex();
	}

	if ($type === AccountYookassa::TYPE_CODE)
	{
		$oauthService = new AccountYookassa();
	}

	if ($oauthService)
	{
		$oauthService->setService(SeoCheckoutService::getInstance());
		return $oauthService;
	}

	throw new MainSystemException("Service with type: "{$type}" not found");
}