From 81ce9d28e618b2995353781d2b077b98df89af3d Mon Sep 17 00:00:00 2001 From: Ted Munsch Date: Wed, 10 Jul 2024 10:13:33 -0400 Subject: [PATCH] Update README.md --- README.md | 75 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 42 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 3ee63d8..95a81c9 100644 --- a/README.md +++ b/README.md @@ -1,47 +1,56 @@ -# WHMCS Sample Provisioning Module # +## WHMCS -## Summary ## +WHMCS Module for the [Easy Panel](https://github.com/easypanel-io). -Provisioning Modules, also referred to as Product or Server Modules, allow you -to create modules that allow for the provisioning and management of products & -services in WHMCS. -The sample files here demonstrates how a provisioning module for WHMCS should -be structured and exercises all supported functionality. +## Configuration support -For more information, please refer to the documentation at: -https://developers.whmcs.com/provisioning-modules/ +Please use the [EasyPanel Discord](https://discord.gg/SARw8nbpnZ) for configuration related support instead of GitHub issues. -## Recommended Module Content ## -The recommended structure of a provisioning module is as follows. +## Installation -``` - provisioningmodule/ - |- lib/ - |- templates/ - |- tests/ - | hooks.php - | logo.png - | provisioningmodule.php -``` -## Minimum Requirements ## +1. Download/Git clone this repository. +2. Move the ``easypanel/`` folder into ``/modules/servers/``. +3. Login to your Easypanel and Navigate to Settings > Users +4. Click ``Generate API Key`` +5. Copy the API key by clicking the Clipboard Icon +4. In WHMCS 8+ navigate to System Settings → Servers. In WHMCS 7 or below navigate to Setup → Products/Services → Servers +5. Create new server, fill the name with anything you want, hostname as the url to the panel either as an IP or domain. For example: ``123.123.123.123`` or ``my.easypanel.com`` +6. Change Server Type to EasyPanel, leave username empty, fill the password field with your generated API Key. +7. Tick the "Secure" option if your panel is using SSL. +8. Confirm that everything works by clicking the Test Connection button -> Save Changes. +9. Go back to the Servers screen and press Create New Group, name it anything you want and choose the created server and press the Add button, Save Changes. +10. Navigate to Setup > Products/Services > Products/Services +11. Create your desired product (and product group if you haven't already) with the type of Other and product name of anything -> Continue. +12. Click the Module Settings tab, choose for Module Name EasyPanel and for the Server Group the group you created in step 8. +13. Fill all non-optional fields, and you are good to go! -For the latest WHMCS minimum system requirements, please refer to -https://docs.whmcs.com/System_Requirements +## Credits -We recommend your module follows the same minimum requirements wherever -possible. +[Andrei](https://github.com/deiucanta) and [Mateus](https://github.com/mateuslacorte) involved in development of the Easy Panel and the WHMCS Module. -## Tests ## -We strongly encourage you to write unit tests for your work. Within this SDK we -provide a sample unit test based upon the widely used PHPUnit. +# FAQ -## Useful Resources -* [Developer Resources](https://developers.whmcs.com/) -* [Hook Documentation](https://developers.whmcs.com/hooks/) -* [API Documentation](https://developers.whmcs.com/api/) +## Overwriting values through configurable options -[WHMCS Limited](https://www.whmcs.com) +Overwriting values can be done through either Configurable Options or Custom Fields. + +Their name should be exactly what you want to overwrite. +Valid options: ``id, service`` + +This also works for any name of environment variables + +Useful trick: You can use the | seperator to change the display name of the variable like this: +service|Application => Will be displayed as "Application" but will work correctly. + + + +## How to enable module debug log + +1. In WHMCS 7 or below navigate to Utilities > Logs > Module Log. For WHMCS 8.x navigate to System Logs > Module Log in the left sidebar. +2. Click the Enable Debug Logging button. +3. Do the action that failed again and you will have required logs to debug the issue. All 404 errors can be ignored. +4. Remember to Disable Debug Logging if you are using this in production, as it's not recommended to have it enabled.