Implement Hosting Account Management #71
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
This pull request introduces a new feature to the billing system - the ability to manage hosting accounts for customers. This includes creating, suspending, unsuspending, and upgrading hosting accounts, as well as integrating the hosting account management with the billing system.
Description
The changes in this pull request include:
HostingAccount
model to represent a customer's hosting account, with fields such ascustomer_id
,subscription_id
,control_panel
,username
,domain
,package
, andstatus
.hosting_accounts
table in the database.HostingService
class to handle the integration with different control panel APIs (cPanel, Plesk, DirectAdmin) for creating, suspending, unsuspending, and upgrading hosting accounts.BillingService
to ensure that a customer's hosting account is active when their subscription is paid, and suspended when their subscription is overdue.Summary
The key changes in this pull request are:
app/Models/HostingAccount.php
: New model for hosting accountsdatabase/migrations/2023_05_25_000000_create_hosting_accounts_table.php
: New migration for hosting accounts tableapp/Services/HostingService.php
: New service for managing hosting accountsapp/Services/BillingService.php
: Updated to integrate hosting account managementapp/Filament/Resources/HostingAccountResource.php
: New Filament resource for hosting accountsSuggested changes from Sweep Chat by @curtisdelicata. Continue chatting at https://sweep-chat-demo.vercel.app/c/bc7ca094-43d9-4553-b134-e57c9094f817.