45 if (!$this->supportChecker->canUse())
48 $result->addError(
new Error(
'Service is unavailable'));
54 if (!$paramsResult->isSuccess())
56 $providerId = $this->optionManager->getProviderId();
61 $sender = MessageService\Sender\SmsManager::getSenderById($providerId);
62 \Bitrix\Main\Application::getInstance()->addBackgroundJob([$sender,
'refreshFromList']);
65 $result->addErrors($paramsResult->getErrors());
70 $requestParams = $paramsResult->getData();
80 $requestResult = $this->externalSender->callExternalMethod($method, $requestParams);
81 if (!$requestResult->isSuccess())
83 $result->addErrors($requestResult->getErrors());
88 $apiData = $requestResult->getData();
89 $result->setExternalId($apiData[
'requestId']);
90 $result->setAccepted();