|
1 | | -# Cpanel Licensing Class |
2 | | - |
3 | | -Cpanel Licensing Class |
4 | | - |
5 | | - |
6 | | -In admin Licensing menu theres a 'CPanel Packages' link now that shows a display of the packages |
7 | | - |
8 | | - |
9 | | - |
10 | | -## New Cpanel Licenses Type Update |
11 | | - |
12 | | -The CPanel licenses are undergoing as major change heres wwhats left on the work to migrate to the new setup |
13 | | - |
14 | | - |
15 | | -### Potential Issues and thigns to address |
16 | | - |
17 | | -* If there is a commmunication problem loading the license data from cpanel ensure that it does not set some crazy values; but instead bails or retries |
18 | | -* For reactivation of a license, it would go by the last known / billed invoice amount right or would the cost for reactivation be reset back to the minimmum amounts where we assume no accounts? |
19 | | -* Price increase is scheduled for September 1st, 2019. https://www.interserver.net/tips/kb/cpanel-price-increase-and-alternative-control-panels/ |
20 | | - |
21 | | -### Full New Package Offering |
22 | | - |
23 | | -This is the complete list of licenses we can order including both old and new ones. |
24 | | - |
25 | | -* P1814 INTERSERVER-INTERNAL-VPS |
26 | | -* P188 INTERSERVER-INTERNAL-VZZO |
27 | | -* P21159 cPanel Admin Cloud |
28 | | -* P21163 cPanel Pro Cloud |
29 | | -* P21167 cPanel Premier Cloud |
30 | | -* P21171 cPanel Premier Metal |
31 | | -* P21175 cPanel Admin Cloud (Distributor) |
32 | | -* P21179 cPanel Pro Cloud (Distributor) |
33 | | -* P21183 cPanel Premier Cloud (Distributor) |
34 | | -* P21187 cPanel Premier Metal (Distributor) |
35 | | -* P21893 cPanel Autoscale (Internal) |
36 | | -* P21897 cPanel Autoscale (External) |
37 | | -* P22081 cPanel Plus Cloud |
38 | | -* P2466 INTERSERVER-ENKOMP-INTERNAL-A500 |
39 | | -* P2470 INTERSERVER-ENKOMP-EXTERNAL-A500 |
40 | | -* P24765 DNSNODECLOUD |
41 | | -* P24769 DNSNODEMETAL |
42 | | -* P24925 cPanel Premier Cloud 150 |
43 | | -* P24929 cPanel Premier Cloud 200 |
44 | | -* P24933 cPanel Premier Cloud 250 |
45 | | -* P24937 cPanel Premier Cloud 300 |
46 | | -* P24941 cPanel Premier Cloud 350 |
47 | | -* P24945 cPanel Premier Cloud 400 |
48 | | -* P24949 cPanel Premier Cloud 450 |
49 | | -* P24953 cPanel Premier Cloud 500 |
50 | | -* P24957 cPanel Premier Cloud 550 |
51 | | -* P24961 cPanel Premier Cloud 600 |
52 | | -* P24965 cPanel Premier Cloud 650 |
53 | | -* P24969 cPanel Premier Cloud 700 |
54 | | -* P24973 cPanel Premier Cloud 750 |
55 | | -* P24977 cPanel Premier Cloud 800 |
56 | | -* P24981 cPanel Premier Cloud 850 |
57 | | -* P24985 cPanel Premier Cloud 900 |
58 | | -* P24989 cPanel Premier Cloud 950 |
59 | | -* P24993 cPanel Premier Cloud 1000 |
60 | | -* P25277 cPanel Premier Metal 150 |
61 | | -* P25281 cPanel Premier Metal 200 |
62 | | -* P25285 cPanel Premier Metal 250 |
63 | | -* P25289 cPanel Premier Metal 300 |
64 | | -* P25293 cPanel Premier Metal 350 |
65 | | -* P25297 cPanel Premier Metal 400 |
66 | | -* P25301 cPanel Premier Metal 450 |
67 | | -* P25305 cPanel Premier Metal 500 |
68 | | -* P25309 cPanel Premier Metal 550 |
69 | | -* P25313 cPanel Premier Metal 600 |
70 | | -* P25317 cPanel Premier Metal 650 |
71 | | -* P25321 cPanel Premier Metal 700 |
72 | | -* P25325 cPanel Premier Metal 750 |
73 | | -* P25329 cPanel Premier Metal 800 |
74 | | -* P25333 cPanel Premier Metal 850 |
75 | | -* P25337 cPanel Premier Metal 900 |
76 | | -* P25341 cPanel Premier Metal 950 |
77 | | -* P25345 cPanel Premier Metal 1000 |
78 | | -* P29017 cPanel Premier Cloud 100 |
79 | | -* P29021 cPanel Premier Metal 100 |
80 | | -* P401 INTERSERVER-EXTERNAL |
81 | | -* P559 INTERSERVER-EXTERNAL-VPS |
82 | | -* P560 INTERSERVER-EXTERNAL-VZZO |
83 | | -* P576 INTERSERVER-INTERNAL |
84 | | - |
85 | | - |
86 | | -### Current/Old Packages |
87 | | - |
88 | | -We currently use these packages (which will be getting changed intot he new ones) |
89 | | - |
90 | | -* P1814 INTERSERVER-INTERNAL-VPS |
91 | | -* P188 INTERSERVER-INTERNAL-VZZO |
92 | | -* P576 INTERSERVER-INTERNAL |
93 | | -* P559 INTERSERVER-EXTERNAL-VPS |
94 | | -* P560 INTERSERVER-EXTERNAL-VZZO |
95 | | -* P401 INTERSERVER-EXTERNAL |
96 | | - |
97 | | - |
98 | | -## New Packages |
99 | | - |
100 | | -These are the packages we'll be using and vonerting all the existing packages to |
101 | | - |
102 | | -* P21893 cPanel Autoscale (Internal) |
103 | | -* P21897 cPanel Autoscale (External) |
104 | | - |
105 | | - |
106 | | -https://tldr.ostera.io/ |
107 | | - |
108 | | - |
109 | | -## Build Status and Code Analysis |
110 | | - |
111 | | -Site | Status |
112 | | ---------------|--------------------------- |
113 | | - | [](https://travis-ci.org/detain/myadmin-cpanel-licensing) |
114 | | - | [](https://codeclimate.com/github/detain/myadmin-cpanel-licensing) [](https://codeclimate.com/github/detain/myadmin-cpanel-licensing/coverage) [](https://codeclimate.com/github/detain/myadmin-cpanel-licensing) |
115 | | - | [](https://scrutinizer-ci.com/g/myadmin-plugins/cpanel-licensing/?branch=master) [](https://scrutinizer-ci.com/g/myadmin-plugins/cpanel-licensing/?branch=master) [](https://scrutinizer-ci.com/g/myadmin-plugins/cpanel-licensing/build-status/master) |
116 | | - | [](https://www.codacy.com/app/detain/myadmin-cpanel-licensing) [](https://www.codacy.com/app/detain/myadmin-cpanel-licensing?utm_source=github.com&utm_medium=referral&utm_content=detain/myadmin-cpanel-licensing&utm_campaign=Badge_Coverage) |
117 | | - | [](https://coveralls.io/github/detain/myadmin-cpanel-licensing?branch=master) |
118 | | - | [](https://packagist.org/packages/detain/myadmin-cpanel-licensing) [](https://packagist.org/packages/detain/myadmin-cpanel-licensing) [](//packagist.org/packages/detain/myadmin-cpanel-licensing) [](https://packagist.org/packages/detain/myadmin-cpanel-licensing) [](https://packagist.org/packages/detain/myadmin-cpanel-licensing) [](https://packagist.org/packages/detain/myadmin-cpanel-licensing) |
| 1 | +# MyAdmin cPanel Licensing Plugin |
119 | 2 |
|
| 3 | +[](https://github.com/detain/myadmin-cpanel-licensing/actions/workflows/tests.yml) |
| 4 | +[](https://packagist.org/packages/detain/myadmin-cpanel-licensing) |
| 5 | +[](https://packagist.org/packages/detain/myadmin-cpanel-licensing) |
| 6 | +[](https://packagist.org/packages/detain/myadmin-cpanel-licensing) |
| 7 | + |
| 8 | +A MyAdmin plugin that integrates cPanel license management into the MyAdmin billing and administration platform. It provides automated provisioning, activation, deactivation, IP changes, and billing reconciliation for cPanel licenses through the cPanel Manage2 API. |
| 9 | + |
| 10 | +## Features |
| 11 | + |
| 12 | +- Activate and deactivate cPanel licenses via the cPanel Manage2 API |
| 13 | +- Change the IP address associated with a cPanel license |
| 14 | +- Verify license status for a given IP |
| 15 | +- Retrieve license data and account lists by IP |
| 16 | +- KernelCare and Ksplice addon license management |
| 17 | +- Admin view of all active cPanel licenses |
| 18 | +- Unbilled license detection and reporting |
| 19 | +- Symfony EventDispatcher integration for the MyAdmin plugin system |
| 20 | + |
| 21 | +## Requirements |
| 22 | + |
| 23 | +- PHP >= 5.0 |
| 24 | +- ext-soap |
| 25 | +- symfony/event-dispatcher ^5.0 |
| 26 | +- detain/cpanel-licensing (cPanel Manage2 API wrapper) |
120 | 27 |
|
121 | 28 | ## Installation |
122 | 29 |
|
123 | | -Install with composer like |
| 30 | +Install with Composer: |
124 | 31 |
|
125 | 32 | ```sh |
126 | 33 | composer require detain/myadmin-cpanel-licensing |
127 | 34 | ``` |
128 | 35 |
|
129 | | -## License |
| 36 | +## Usage |
| 37 | + |
| 38 | +The plugin registers itself with the MyAdmin framework through event hooks. It is loaded automatically by the plugin system when installed. |
| 39 | + |
| 40 | +### Plugin Hooks |
| 41 | + |
| 42 | +The plugin listens on the following events: |
| 43 | + |
| 44 | +| Event | Handler | Description | |
| 45 | +|---|---|---| |
| 46 | +| `licenses.settings` | `getSettings` | Registers cPanel configuration fields | |
| 47 | +| `licenses.activate` | `getActivate` | Provisions a new cPanel license | |
| 48 | +| `licenses.reactivate` | `getActivate` | Re-provisions an expired license | |
| 49 | +| `licenses.deactivate` | `getDeactivate` | Expires a cPanel license | |
| 50 | +| `licenses.deactivate_ip` | `getDeactivateIp` | Expires a license by IP | |
| 51 | +| `licenses.change_ip` | `getChangeIp` | Moves a license to a new IP | |
| 52 | +| `function.requirements` | `getRequirements` | Registers function autoloading | |
| 53 | +| `ui.menu` | `getMenu` | Adds admin menu entries | |
| 54 | + |
| 55 | +### Standalone Functions |
130 | 56 |
|
131 | | -The Cpanel Licensing Class class is licensed under the LGPL-v2.1 license. |
| 57 | +The package also provides procedural helper functions: |
| 58 | + |
| 59 | +- `activate_cpanel($ip, $package)` - Activate a license for an IP with a given package ID |
| 60 | +- `deactivate_cpanel($ip)` - Deactivate a license by IP |
| 61 | +- `verify_cpanel($ip)` - Check if a license is active |
| 62 | +- `get_cpanel_license_data_by_ip($ip)` - Get full license details |
| 63 | +- `get_cpanel_licenses()` - List all licenses on the account |
| 64 | +- `get_cpanel_accounts_for_license_ip($ip)` - Get accounts for a licensed IP |
| 65 | + |
| 66 | +## Running Tests |
| 67 | + |
| 68 | +```sh |
| 69 | +composer install |
| 70 | +vendor/bin/phpunit |
| 71 | +``` |
| 72 | + |
| 73 | +To generate a coverage report: |
| 74 | + |
| 75 | +```sh |
| 76 | +vendor/bin/phpunit --coverage-html coverage/ |
| 77 | +``` |
| 78 | + |
| 79 | +## License |
132 | 80 |
|
| 81 | +This package is licensed under the [LGPL-2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) license. |
0 commit comments