Deploy Ladill Hosting / deploy (push) Failing after 17s
Shared web hosting extracted from the platform monolith, with CI deploy to /var/www/ladill-hosting matching Bird/Domains/Email. Co-authored-by: Cursor <cursoragent@cursor.com>
51 lines
1.4 KiB
PHP
51 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Services\ResellerClub;
|
|
|
|
class ResellerClubConsoleService
|
|
{
|
|
private const DEFAULT_CONTROL_PANEL_URL = 'https://manage.resellerclub.com/customer';
|
|
|
|
public const SERVICE_DNS = 'dns';
|
|
|
|
public const SERVICE_WEB_HOSTING = 'webhosting';
|
|
|
|
public const SERVICE_MAIL_HOSTING = 'mailhosting';
|
|
|
|
public const SERVICE_WEBSITE_BUILDER = 'websitebuilder';
|
|
|
|
public function launchUrl(): string
|
|
{
|
|
return rtrim($this->configuredControlPanelUrl(), '/').'/servlet/ManageServiceServletForAPI';
|
|
}
|
|
|
|
/**
|
|
* @return array<string, string>
|
|
*/
|
|
public function buildManagedServicePayload(string $loginToken, string $orderId, string $serviceName): array
|
|
{
|
|
return [
|
|
'loginid' => $loginToken,
|
|
'orderid' => $orderId,
|
|
'service-name' => $serviceName,
|
|
];
|
|
}
|
|
|
|
public function autoLoginUrl(string $loginToken, string $role = 'customer'): string
|
|
{
|
|
return sprintf(
|
|
'%s/servlet/AutoLoginServlet?userLoginId=%s&role=%s',
|
|
rtrim($this->configuredControlPanelUrl(), '/'),
|
|
urlencode($loginToken),
|
|
urlencode($role)
|
|
);
|
|
}
|
|
|
|
private function configuredControlPanelUrl(): string
|
|
{
|
|
$value = trim((string) config('mailinfra.resellerclub_control_panel_url'));
|
|
|
|
return $value !== '' ? $value : self::DEFAULT_CONTROL_PANEL_URL;
|
|
}
|
|
}
|