Implement Pricing and Control Panel Integration #150
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.
This pull request was created by Sweep to resolve the following request by @curtisdelicata:
Continue chatting at https://sweep-chat-demo.vercel.app/c/5b7f7308-14bc-4a9e-a886-c35776398110.
Purpose
This pull request introduces a pricing service and control panel integration for the billing-laravel application. It allows for flexible pricing models and seamless integration with hosting control panels.
Description
The changes in this pull request include:
Pricing Service: A new
PricingService
class has been added to handle the calculation of product prices based on different pricing models (fixed, tiered, and usage-based). This service can be extended to support more complex pricing scenarios in the future.Control Panel Integration: New
PleskClient
andDirectAdminClient
classes have been added to provide a standardized interface for interacting with Plesk and DirectAdmin control panels. These classes currently have placeholder implementations, but they can be updated to use the actual control panel APIs.Hosting Service: The
HostingService
class has been updated to use the newPricingService
and control panel clients to provision and upgrade hosting accounts. It now calculates the price of the hosting plan based on the selected product and options.Products_Service Model: The
Products_Service
model has been updated to include new fields for the pricing model and custom pricing data. ThegetPriceAttribute
method has been added to calculate the final price of the product.Filament Resource: A new Filament resource,
ProductsServiceResource
, has been added to provide a user interface for managing products and services, including their pricing models and custom pricing data.Summary
The key changes in this pull request are:
PricingService
to handle flexible pricing modelsPleskClient
andDirectAdminClient
for control panel integrationHostingService
to use the new pricing and control panel servicesProducts_Service
model to support more pricing options