Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Pricing and Control Panel Integration #150

Merged

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented Aug 23, 2024

This pull request was created by Sweep to resolve the following request by @curtisdelicata:

Customizable service packages and pricing.
Automated provisioning with integrations (cPanel, Plesk, etc.).

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:

  1. 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.

  2. Control Panel Integration: New PleskClient and DirectAdminClient 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.

  3. Hosting Service: The HostingService class has been updated to use the new PricingService 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.

  4. Products_Service Model: The Products_Service model has been updated to include new fields for the pricing model and custom pricing data. The getPriceAttribute method has been added to calculate the final price of the product.

  5. 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:

  • Introduced PricingService to handle flexible pricing models
  • Added PleskClient and DirectAdminClient for control panel integration
  • Updated HostingService to use the new pricing and control panel services
  • Expanded the Products_Service model to support more pricing options
  • Created a Filament resource for managing products and services

@curtisdelicata curtisdelicata merged commit a722b2f into main Aug 23, 2024
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant