Enhance WHMCS integration with mTLS support and product mapping features. Added mTLS configuration options, updated API endpoints for mTLS status and fingerprint registration, and implemented product validation API. Updated database schema and documentation accordingly.
This commit is contained in:
@@ -5,6 +5,7 @@ if (!defined('WHMCS')) {
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/lib/ApiClient.php';
|
||||
require_once __DIR__ . '/../../../lib/ProductMapping.php';
|
||||
|
||||
function hexagamecloud_MetaData(): array
|
||||
{
|
||||
@@ -59,10 +60,10 @@ function hexagamecloud_CreateAccount(array $params): string
|
||||
'externalServiceId' => $externalServiceId,
|
||||
'externalClientId' => $externalClientId,
|
||||
'externalProductId' => (string) ($params['pid'] ?? ''),
|
||||
'planSlug' => $params['configoption1'] ?: 'free',
|
||||
'planSlug' => HexaGameCloudProductMapping::resolvePlanSlug($params),
|
||||
'serverName' => $params['domain'] ?: ('server-' . $externalServiceId),
|
||||
'minecraftVersion' => $params['configoption2'] ?: '1.21.1',
|
||||
'softwareFamily' => $params['configoption3'] ?: 'VANILLA',
|
||||
'minecraftVersion' => HexaGameCloudProductMapping::resolveMinecraftVersion($params),
|
||||
'softwareFamily' => HexaGameCloudProductMapping::resolveSoftwareFamily($params),
|
||||
'edition' => 'JAVA',
|
||||
'eulaAccepted' => true,
|
||||
]);
|
||||
@@ -101,7 +102,7 @@ function hexagamecloud_ChangePackage(array $params): string
|
||||
try {
|
||||
$client = new HexaGameCloudApiClient($params);
|
||||
$client->changePackage((string) $params['serviceid'], [
|
||||
'planSlug' => $params['configoption1'] ?: 'free',
|
||||
'planSlug' => HexaGameCloudProductMapping::resolvePlanSlug($params),
|
||||
]);
|
||||
return 'success';
|
||||
} catch (Throwable $exception) {
|
||||
|
||||
Reference in New Issue
Block a user