24 if (self::includePullModule())
26 \CPullWatch::Add($userId, self::PAYMENT_COMMAND);
32 if (!self::includePullModule())
38 self::SUCCESSFUL_PAYMENT,
45 if (!self::includePullModule())
51 self::FAILURE_PAYMENT,
56 private static function sendEvent(
string $eventName,
int $id): void
58 $userIds = self::getSubscribedUserIds();
67 'module_id' => self::MODULE_ID,
68 'command' => self::PAYMENT_COMMAND,
70 'eventName' => $eventName,
77 private static function getSubscribedUserIds(): array
79 return Pull\Model\WatchTable::getUserIdsByTag(
84 private static function includePullModule(): bool
86 return Main\Loader::includeModule(
'pull');