feat: add advanced features — KB, tickets v2, multi-currency, cart, quotes, affiliates, credits, staff RBAC, fraud detection, service panels
Major additions: - Knowledge base with categories, articles, revisions, and voting - Enhanced ticket system: departments, SLA policies, canned responses, tags, custom fields, satisfaction ratings, internal notes - Multi-currency support with exchange rate sync - Shopping cart and quote system with PDF generation - Affiliate program with referrals, commissions, and payouts - Account credits, credit notes, and debit notes - Staff management with granular role-based permissions - Fraud detection and order risk assessment - ServerHunter SEO integration - Service lifecycle events (suspend/unsuspend/terminate) - Service management panels for VPS, Dedicated, Hosting, and Game servers - Plan lifecycle fields and per-customer overrides - 30+ migrations, 17 factories, 8 feature test suites Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -392,6 +392,7 @@ final class Phase3Services extends AbstractPhase
|
||||
$isSuspended = strtolower($whmcsStatus) === 'suspended';
|
||||
$isTerminated = in_array(strtolower($whmcsStatus), ['terminated', 'cancelled'], true);
|
||||
|
||||
$recurringAmount = $this->nullIfEmpty((string) ($product['recurringamount'] ?? ''));
|
||||
$dedicatedIp = $this->nullIfEmpty((string) ($product['dedicatedip'] ?? ''));
|
||||
$domain = $this->nullIfEmpty((string) ($product['domain'] ?? ''));
|
||||
|
||||
@@ -414,6 +415,7 @@ final class Phase3Services extends AbstractPhase
|
||||
'stripe_price' => null,
|
||||
'quantity' => 1,
|
||||
'billing_cycle' => $billingCycle,
|
||||
'recurring_amount' => $recurringAmount,
|
||||
'current_period_end' => $nextDueDate,
|
||||
'created_at' => $regDate ?? $now,
|
||||
'updated_at' => $now,
|
||||
|
||||
@@ -148,15 +148,16 @@ final class StatusMapper
|
||||
*
|
||||
* Returns null for service types that have no auto-provisioning platform.
|
||||
*/
|
||||
public static function mapPlatform(string $serviceType): ?string
|
||||
public static function mapPlatform(string $serviceType): string
|
||||
{
|
||||
return match ($serviceType) {
|
||||
'vps' => 'virtfusion',
|
||||
'dedicated' => 'synergycp',
|
||||
'hosting' => 'enhance',
|
||||
'game_server' => 'pterodactyl',
|
||||
'mysql' => null,
|
||||
'backups' => null,
|
||||
'mysql' => 'manual',
|
||||
'backups' => 'manual',
|
||||
'other' => 'manual',
|
||||
default => 'virtfusion',
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user