diff --git a/docs/.vuepress/config-client/documents.ts b/docs/.vuepress/config-client/documents.ts index 883543de..3aabee6d 100644 --- a/docs/.vuepress/config-client/documents.ts +++ b/docs/.vuepress/config-client/documents.ts @@ -65,10 +65,15 @@ export default [ link: "/localization/", }, { - title: "WHMCS Plugin", - description: "Using WHMCS Plugin for Imunify360.", + title: "WHMCS plugin for licensing", + description: "Using WHMCS Plugin for Imunify360 licensing.", link: "/whmcs_plugin/", }, + { + title: "Imunify Products WHMCS plugin", + description: "Integrate Imunify security services with WHMCS for automated billing and provisioning.", + link: "/whmcs_imunify_products/", + }, { title: "FAQ and Known Issues", description: "Frequently asked questions about Imunify360 performance, configuration, and known issues troubleshooting and resolution.", diff --git a/docs/.vuepress/public/images/whmcs_imunify_products/activate_addon.png b/docs/.vuepress/public/images/whmcs_imunify_products/activate_addon.png new file mode 100644 index 00000000..4ff4d476 Binary files /dev/null and b/docs/.vuepress/public/images/whmcs_imunify_products/activate_addon.png differ diff --git a/docs/.vuepress/public/images/whmcs_imunify_products/addon_dashboard.png b/docs/.vuepress/public/images/whmcs_imunify_products/addon_dashboard.png new file mode 100644 index 00000000..61b4d59a Binary files /dev/null and b/docs/.vuepress/public/images/whmcs_imunify_products/addon_dashboard.png differ diff --git a/docs/.vuepress/public/images/whmcs_imunify_products/addon_module_list_after_upgrade.png b/docs/.vuepress/public/images/whmcs_imunify_products/addon_module_list_after_upgrade.png new file mode 100644 index 00000000..15679994 Binary files /dev/null and b/docs/.vuepress/public/images/whmcs_imunify_products/addon_module_list_after_upgrade.png differ diff --git a/docs/.vuepress/public/images/whmcs_imunify_products/admin_eula.png b/docs/.vuepress/public/images/whmcs_imunify_products/admin_eula.png new file mode 100644 index 00000000..dbb78164 Binary files /dev/null and b/docs/.vuepress/public/images/whmcs_imunify_products/admin_eula.png differ diff --git a/docs/.vuepress/public/images/whmcs_imunify_products/deactivation_warning.png b/docs/.vuepress/public/images/whmcs_imunify_products/deactivation_warning.png new file mode 100644 index 00000000..947a0ac6 Binary files /dev/null and b/docs/.vuepress/public/images/whmcs_imunify_products/deactivation_warning.png differ diff --git a/docs/.vuepress/public/images/whmcs_imunify_products/enable_maintenance_mode.png b/docs/.vuepress/public/images/whmcs_imunify_products/enable_maintenance_mode.png new file mode 100644 index 00000000..bb16f52b Binary files /dev/null and b/docs/.vuepress/public/images/whmcs_imunify_products/enable_maintenance_mode.png differ diff --git a/docs/.vuepress/public/images/whmcs_imunify_products/log_module_upgrade.png b/docs/.vuepress/public/images/whmcs_imunify_products/log_module_upgrade.png new file mode 100644 index 00000000..de2fb7e2 Binary files /dev/null and b/docs/.vuepress/public/images/whmcs_imunify_products/log_module_upgrade.png differ diff --git a/docs/.vuepress/public/images/whmcs_imunify_products/product_dashboard_ca.png b/docs/.vuepress/public/images/whmcs_imunify_products/product_dashboard_ca.png new file mode 100644 index 00000000..9cfd2b0f Binary files /dev/null and b/docs/.vuepress/public/images/whmcs_imunify_products/product_dashboard_ca.png differ diff --git a/docs/.vuepress/public/images/whmcs_imunify_products/product_group.png b/docs/.vuepress/public/images/whmcs_imunify_products/product_group.png new file mode 100644 index 00000000..a1e864e3 Binary files /dev/null and b/docs/.vuepress/public/images/whmcs_imunify_products/product_group.png differ diff --git a/docs/.vuepress/public/images/whmcs_imunify_products/product_notification_setting.png b/docs/.vuepress/public/images/whmcs_imunify_products/product_notification_setting.png new file mode 100644 index 00000000..24a36549 Binary files /dev/null and b/docs/.vuepress/public/images/whmcs_imunify_products/product_notification_setting.png differ diff --git a/docs/.vuepress/public/images/whmcs_imunify_products/product_pricing.png b/docs/.vuepress/public/images/whmcs_imunify_products/product_pricing.png new file mode 100644 index 00000000..5abc75c2 Binary files /dev/null and b/docs/.vuepress/public/images/whmcs_imunify_products/product_pricing.png differ diff --git a/docs/.vuepress/public/images/whmcs_imunify_products/upgrade_notification.png b/docs/.vuepress/public/images/whmcs_imunify_products/upgrade_notification.png new file mode 100644 index 00000000..5453f5d4 Binary files /dev/null and b/docs/.vuepress/public/images/whmcs_imunify_products/upgrade_notification.png differ diff --git a/docs/.vuepress/public/images/whmcs_imunify_products/upgrade_notification2.png b/docs/.vuepress/public/images/whmcs_imunify_products/upgrade_notification2.png new file mode 100644 index 00000000..6d83658c Binary files /dev/null and b/docs/.vuepress/public/images/whmcs_imunify_products/upgrade_notification2.png differ diff --git a/docs/.vuepress/public/images/whmcs_imunify_products/upgrade_notification3.png b/docs/.vuepress/public/images/whmcs_imunify_products/upgrade_notification3.png new file mode 100644 index 00000000..fbaffd7c Binary files /dev/null and b/docs/.vuepress/public/images/whmcs_imunify_products/upgrade_notification3.png differ diff --git a/docs/.vuepress/public/images/whmcs_imunify_products/usd_currency_enabled.png b/docs/.vuepress/public/images/whmcs_imunify_products/usd_currency_enabled.png new file mode 100644 index 00000000..f6d9bb01 Binary files /dev/null and b/docs/.vuepress/public/images/whmcs_imunify_products/usd_currency_enabled.png differ diff --git a/docs/whmcs_imunify_products/README.md b/docs/whmcs_imunify_products/README.md new file mode 100644 index 00000000..8eb1c83d --- /dev/null +++ b/docs/whmcs_imunify_products/README.md @@ -0,0 +1,318 @@ +# Imunify Products WHMCS Module + +## Overview + +The Imunify Products module integrates Imunify security services (Patch) with your WHMCS installation, enabling you to sell and provision these services directly from your client area with automated billing and provisioning. + +**Current Version:** 1.0.4 + +## See also + +- **[Upgrade Guide](./UPGRADE)** - Step-by-step module upgrade instructions + +## System Requirements + +- **PHP Version:** PHP 7.3 or higher +- **WHMCS Version:** Compatible with WHMCS 8.0 and later +- **Database:** MySQL/MariaDB (as required by WHMCS) + +### Prerequisites + +Before installing the module, ensure the following prerequisites are met: + +1. **USD Currency Configuration** + - The USD currency must be configured in your WHMCS installation + - Go to **Setup > Payments > Currencies** and ensure USD is active + - Activation will fail if USD currency is not found + +![](/images/whmcs_imunify_products/usd_currency_enabled.png) + +2. **Imunify API Access** + - You must have a valid Imunify API key + - The API key will be required during module configuration + +3. **WHMCS Admin Access** + - Full administrator access to your WHMCS installation + - Permissions to install addon and provisioning modules + +## Installation + +### Step 1: Download Module Files + +1. Download the latest version of the Imunify Products module from the [Imunify website](https://imunify360.com/) or your CloudLinux account +2. Extract the archive to a temporary location on your computer + +:::tip Note +Make sure you download the complete module package containing both the addon and provisioning modules. +::: + +### Step 2: Upload Module Files to WHMCS + +Upload the module files to your WHMCS installation directory: + +1. **Addon Module:** + - Upload the contents of `modules/addons/ImunifyProducts/` to: + ``` + /path/to/whmcs/modules/addons/ImunifyProducts/ + ``` + +2. **Provisioning Module:** + - Upload the contents of `modules/servers/ImunifyProducts/` to: + ``` + /path/to/whmcs/modules/servers/ImunifyProducts/ + ``` + +3. **Verify File Structure:** + Ensure the following structure exists: + ``` + modules/ + ├── addons/ + │ └── ImunifyProducts/ + │ ├── ImunifyProducts.php + │ ├── hooks.php + │ ├── assets/ + │ ├── lang/ + │ ├── lib/ + │ └── templates/ + └── servers/ + └── ImunifyProducts/ + ├── ImunifyProducts.php + ├── assets/ + ├── Configs/ + ├── lang/ + ├── lib/ + └── templates/ + ``` + +### Step 3: Activate the Addon Module + +1. Log in to your WHMCS admin area +2. Navigate to **Setup > Addon Modules** +3. Locate **Imunify Products** in the list +4. Click **Activate** +5. If activation is successful, you'll see a success message + +![](/images/whmcs_imunify_products/activate_addon.png) + +**What happens during activation:** +- Validates that USD currency is configured +- Reactivates any previously retired Imunify products (if module was deactivated before) +- Creates email templates for order notifications +- Sets up necessary database structures + +:::tip Note +If activation fails with "USD currency not configured", go to **Setup > Payments > Currencies**, add USD currency if it doesn't exist, ensure it's active, and try activating again. + +![](/images/whmcs_imunify_products/usd_currency_enabled.png) +::: + +### Step 4: Configure the Addon Module + +1. After activation, click **Configure** next to Imunify Products +2. Enter your **Imunify API Key** in the configuration field +3. Click **Save Changes** + +:::tip Note +The API key is required for the module to communicate with Imunify services. You can obtain your API key from your Imunify account. +::: + +### Step 5: Verify Server Module Installation + +The provisioning module (`modules/servers/ImunifyProducts/`) is automatically recognized by WHMCS. You do not need to manually activate it. + +:::tip Note +The server module is automatically configured by the addon module. Manual modifications to server settings are not recommended and may disrupt integration. +::: + +## Enabling Products + +### Import Imunify Products + +After installation and configuration, you can import Imunify products: + +1. Navigate to **Addons > Imunify Products** in the admin area +2. Use the product import (green "enable" button) functionality to add: + - **Imunify Patch** products (vulnerability patching) - Available in version 1.0.3 + +![](/images/whmcs_imunify_products/addon_dashboard.png) + +**What happens when you import products:** +- Products are automatically created in your WHMCS system +- Required custom fields are automatically added to each product: + - **Domain Name** (text, required) + - **Server IP** (text, required) + - **EULA Accept** (checkbox, required) + - **Subscription Target Id** (text, required) + - **Imunify Id** (text, required) +- Pricing structures are imported from Imunify +- Products are organized in a dedicated product group +- Products become available for customers to order + +![](/images/whmcs_imunify_products/product_group.png) + +![](/images/whmcs_imunify_products/product_pricing.png) + +### EULA Acceptance + +The module requires End User License Agreement (EULA) acceptance: + +**Admin EULA:** +- When you first navigate to **Addons > Imunify Products** in the admin area, you must read and accept the EULA to access the module dashboard +- The EULA text is retrieved from the Imunify API +- This is a one-time acceptance required for administrative access + +![](/images/whmcs_imunify_products/admin_eula.png) + +**Client EULA:** +- A separate EULA is displayed on product order forms for customers +- The EULA text is retrieved from the Imunify API +- Customers must accept the EULA before completing their order +- Currently, the EULA text is available in English only; the API will support other languages in the future + +:::tip Note +When the module is deactivated, the EULA acceptance flag is removed from the WHMCS database. However, the information that the EULA was once accepted is preserved on the Imunify side for compliance and record-keeping purposes. +::: + +:::tip Note +Custom fields are automatically managed by the module and should not be manually modified. +::: + +### Product Configuration + +When products are imported, you can configure additional settings: + +- **Enable Notifications:** Controls whether Imunify sends promotional notifications to customers + - **Enabled by default** - when enabled, Imunify sends promotional notifications (including product purchase URL) to customers in the hosting panel + - Configured per product in **Setup > Products/Services > Products/Services > [Select Product] > Module Settings** + - This setting updates the product configuration on the Imunify API end + +![](/images/whmcs_imunify_products/product_notification_setting.png) + +### Price Recalculations + +The module automatically updates product pricing on a daily basis through a scheduled cron job. This ensures that: + +- Product prices stay synchronized with Imunify pricing +- Any pricing changes from Imunify are automatically reflected in WHMCS +- Customers always see current pricing when ordering + +:::tip Note +Price updates occur automatically via the daily cron job. No manual intervention is required. +::: + +## Disabling Products + +### Deactivating Individual Products + +You can deactivate individual Imunify products through the standard WHMCS product management: + +1. Navigate to **Setup > Products/Services > Products/Services** +2. Find the Imunify product you want to deactivate +3. Edit the product and set it to **Hidden** or **Retired** + +**What happens when you deactivate a product:** +- The product is no longer visible in the order form +- Existing services remain active and functional +- Customers with active services can still access their Imunify services +- Billing continues for existing services + +### Deactivating the Module + +To completely deactivate the Imunify Products module: + +1. Navigate to **Setup > Addon Modules** +2. Click **Deactivate** next to Imunify Products + +![](/images/whmcs_imunify_products/deactivation_warning.png) + +**What happens when you deactivate the module:** +- All Imunify products are deactivated +- Products with existing services are marked as **retired** (not deleted) to preserve service history +- Products without active services are completely removed +- Email templates are removed +- EULA configuration is removed from the WHMCS database +- Module-specific settings are cleaned up + +:::warning Important +When the module is deactivated: +- The EULA configuration flag is removed from the WHMCS database +- However, the information that the EULA was once accepted is preserved on the Imunify side for compliance and record-keeping purposes +- Customers with active services will continue to have access to their Imunify services +- Products with active services are marked as retired but not deleted to preserve service history +::: + +## Version Update Notifications + +The module automatically checks for newer versions and displays update notifications in three locations: + +### 1. Main WHMCS Dashboard + +When a newer version is available, a notification banner appears on the main WHMCS Dashboard (Home page) with a dismiss button. If you dismiss the notification, it will not appear again until an even newer version is released. + +![](/images/whmcs_imunify_products/upgrade_notification3.png) + +### 2. Addon Module List Page + +On the **Setup > Addon Modules** page, the module row displays an "Upgrade available" badge when a newer version is detected. + +![](/images/whmcs_imunify_products/upgrade_notification.png) + +### 3. Module Dashboard Page + +When you navigate to **Addons > Imunify Products**, a notification banner appears at the top of the module dashboard if a newer version is available. + +![](/images/whmcs_imunify_products/upgrade_notification2.png) + +:::tip Note +Version checks are performed automatically: +- Once per day via the daily cron job +- Every time an administrator accesses the module dashboard +::: + +## Product Support by Version + +**Version 1.0.3:** +- Supports **Imunify Patch** product only +- The pricing API endpoint returns pricing only for Patch products +- Only Patch products can be enabled and imported + +## Troubleshooting + +### Module Not Appearing in Addon Modules List + +**Possible Causes:** +- Files not uploaded to correct location +- WHMCS cache needs clearing + +**Solution:** +1. Verify file structure matches installation instructions +2. Clear WHMCS cache: + - Go to **Utilities > System > Clear Cache** + - Or delete contents of `/path/to/whmcs/templates_c/` +3. Refresh the Addon Modules page + +### API Key Not Working + +**Solution:** +1. Verify the API key is correct in **Setup > Addon Modules > Imunify Products > Configure** +2. Check that the API key has proper permissions in your Imunify account +3. Test API connectivity from your server + +### Products Not Importing + +**Solution:** +1. Verify API key is configured correctly +2. Check WHMCS error logs: **Utilities > Logs > Module Log** +3. Ensure USD currency is active +4. Check that product group can be created (sufficient permissions) + +## Support and Resources + +- **Imunify Website:** https://imunify360.com/ +- **Module Version:** 1.0.3 +- **Author:** CloudLinux + +--- + +**Last Updated:** 27 Nov 2025 + diff --git a/docs/whmcs_imunify_products/UPGRADE.md b/docs/whmcs_imunify_products/UPGRADE.md new file mode 100644 index 00000000..e1c92cf5 --- /dev/null +++ b/docs/whmcs_imunify_products/UPGRADE.md @@ -0,0 +1,143 @@ +# Upgrade Guide + +## Overview + +This guide provides step-by-step instructions for upgrading the Imunify Products WHMCS module. Following these steps will ensure a smooth upgrade process while minimizing the risk of data loss or unexpected issues. + +:::warning Important +Always back up your WHMCS installation and database before proceeding with any upgrade. +::: + +## Prerequisites + +Before starting the upgrade, make sure you have: + +- Complete backup of your WHMCS files and database +- Close all tabs with WHMCS admin in your browser +- Full administrator access to your WHMCS installation +- Access to download the latest module version (link will be provided later) + +## Upgrade Steps + +### Step 1: Download Latest Version + +Download the latest version of the Imunify Products module from the provided link + - *(Download link will be provided here)* + +Extract the archive to a temporary location on your computer. +The extracted files should contain: + - `modules/addons/ImunifyProducts/` directory + - `modules/servers/ImunifyProducts/` directory + +### Step 2: Enable Maintenance Mode (Optional but Recommended) + +**We suggest enabling Maintenance Mode in WHMCS** to prevent users from accessing the system during the upgrade process. + +1. Log in to your WHMCS admin area +2. Navigate to **Setup > General Settings > General** +3. Enable **Maintenance Mode** +4. Optionally, configure a maintenance message for your users + +![](/images/whmcs_imunify_products/enable_maintenance_mode.png) + +:::tip Note +Maintenance mode prevents client access during upgrade, reducing the risk of data inconsistencies. +::: + +### Step 3: Delete Old Module Files + +**Delete or rename module files from modules/addons and modules/servers.** + + - Navigate to your WHMCS root directory + - Delete the entire `modules/addons/ImunifyProducts/` directory + - Navigate to your WHMCS root directory + - Delete the entire `modules/servers/ImunifyProducts/` directory + +### Step 4: Upload New Module Files + +:::warning Important +Before you begin, close all open WHMCS browser tabs. Once the file upload is complete, immediately log into the WHMCS Admin Dashboard and navigate directly to the Module Dashboard first (this is critical to trigger the upgrade). +::: + +1. **Upload Addon Module:** + - Upload the contents of `modules/addons/ImunifyProducts/` from the downloaded archive to: + ``` + /path/to/whmcs/modules/addons/ImunifyProducts/ + ``` + +2. **Upload Server Module:** + - Upload the contents of `modules/servers/ImunifyProducts/` from the downloaded archive to: + ``` + /path/to/whmcs/modules/servers/ImunifyProducts/ + ``` + +### Step 5: Trigger Module Upgrade + +**Enter the Admin area dashboard to trigger the upgrade. Successful upgrade should leave a note in logs.** + +1. Log in to your WHMCS admin area + +2. Navigate to **Addons > Imunify Products** (the module dashboard) + +3. The module will automatically detect the version change and trigger the upgrade process + +4. **Verify Upgrade Success:** + - Check **Utilities > Logs > Module Log** for upgrade confirmation + - Look for a log entry indicating successful upgrade from the previous version to the new version + - The log entry should read: *"Module has been upgraded successfully from version X.X.X to Y.Y.Y"* + + ![](/images/whmcs_imunify_products/log_module_upgrade.png) + +5. If the upgrade was successful, you should see the module listed with the new version number + + ![](/images/whmcs_imunify_products/addon_module_list_after_upgrade.png) + +:::tip Note +The upgrade function is automatically triggered when WHMCS detects a version change. No manual deactivation/reactivation is required. +::: + +### Step 6: Register New Hooks + +Navigate to **Setup > Addon Modules** (or **System Settings > Addon Modules**) + +Locate **Imunify Products** in the list + +Click **Configure** next to Imunify Products + +Click **Save Changes** (even if no configuration changes are needed) + +:::tip Note +This step ensures that any new or modified hooks introduced in the upgrade are properly registered with WHMCS. WHMCS registers hooks when module configuration is saved. +::: + +### Step 7: Disable Maintenance Mode + +If you enabled maintenance mode in Step 2: + +1. Navigate to **Setup > General Settings > Other** +2. Disable **Maintenance Mode** +3. Verify your WHMCS installation is accessible to clients + +## Post-Upgrade + +### Clear WHMCS Cache + +After upgrading, it's recommended to clear WHMCS cache: + +1. Navigate to **Utilities > System > Clear Cache** +2. Or manually delete contents of `/path/to/whmcs/templates_c/` directory (except `index.php`) + +--- + +**Last Updated:** 27 Nov 2025 + + + + + + + + + + +