Implement WHMCS Addon Dashboard with API for stats and integrate billing provider logic
Some checks failed
CI / Node — lint, typecheck, test, build (push) Failing after 10s
CI / Go — node-agent tests (push) Failing after 8s
CI / Go — edge-gateway build (push) Successful in 17s

This commit is contained in:
smueller
2026-06-26 15:11:29 +02:00
parent 15cf302afc
commit 4b20efe4bc
30 changed files with 1414 additions and 16 deletions

View File

@@ -17,7 +17,7 @@ describe('phase 9 api contract', () => {
join(process.cwd(), 'src', 'billing/billing.service.ts'),
'utf8',
);
assert.ok(billingSource.includes('isWhmcsBilling'));
assert.ok(billingSource.includes('isExternalBilling'));
const serversSource = readFileSync(
join(process.cwd(), 'src', 'servers/servers.service.ts'),

View File

@@ -0,0 +1,40 @@
import { describe, it } from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
describe('whmcs addon module contract', () => {
it('documents addon dashboard API and PHP module', () => {
const controller = readFileSync(
join(process.cwd(), 'src', 'integrations/whmcs/whmcs-integration.controller.ts'),
'utf8',
);
assert.ok(controller.includes("'dashboard/stats'"));
const addonMain = readFileSync(
join(process.cwd(), '..', '..', 'integrations/whmcs/modules/addons/hexagamecloud/hexagamecloud.php'),
'utf8',
);
assert.ok(addonMain.includes('hexagamecloud_config'));
assert.ok(addonMain.includes('hexagamecloud_page_dashboard'));
assert.ok(addonMain.includes('HexaGameCloudEventPoller'));
});
});
describe('stripe fallback contract', () => {
it('documents optional stripe webhook and billing provider', () => {
const provider = readFileSync(
join(process.cwd(), 'src', 'billing/billing-provider.ts'),
'utf8',
);
assert.ok(provider.includes('isExternalBilling'));
assert.ok(provider.includes("'stripe'"));
const webhook = readFileSync(
join(process.cwd(), 'src', 'billing/stripe/stripe-webhook.service.ts'),
'utf8',
);
assert.ok(webhook.includes('isStripeBilling'));
assert.ok(webhook.includes('ignored'));
});
});