Hi,
We're trying to create a module which would provision email accounts on a Virtualmin server (don't ask why it was requested by a customer). What we have so far is a sample WHMCS provisioning module from github and Virtualmin API documentation. We know the command which needs to be executed on a Vmin server it would be similar to this one:
https://yourserver:10000/virtual-server/remote.cgi?program=create-user
But how can we call this command from WHMCS? It should be somewhere around this place here:
function provisioningmodule_CreateAccount(array $params)
{
try {
// Call the service's provisioning function, using the values provided
// by WHMCS in `$params`.
//
// A sample `$params` array may be defined as:
//
// ```
// array(
// 'domain' => 'The domain of the service to provision',
// 'username' => 'The username to access the new service',
// 'password' => 'The password to access the new service',
// 'configoption1' => 'The amount of disk space to provision',
// 'configoption2' => 'The new services secret key',
// 'configoption3' => 'Whether or not to enable FTP',
// ...
// )
// ```
} catch (Exception $e) {
// Record the error in WHMCS's module log.
logModuleCall(
'provisioningmodule',
__FUNCTION__,
$params,
$e->getMessage(),
$e->getTraceAsString()
);
Please assist, any help will be appreciated...