Initial Ladill Hosting app with Gitea deploy pipeline.
Deploy Ladill Hosting / deploy (push) Failing after 17s
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>
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user