Git Product home page Git Product logo

sample-provisioning-module's People

Contributors

jstanford87 avatar mattpugh avatar meramsey avatar pscott-au avatar shaunr avatar whmcspeter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sample-provisioning-module's Issues

My loader function not called !!!

I am trying to create a provisioning module for whmcs based on the documentation.
According to loader function sections I have created my own function.
But I get the following error
No server found so unable to fetch values
I tested, the loader function is not called.

php version 7.4.4
whmcs version 8.5.2
$params in config function

{
    "whmcsVersion": "8.5.2-release.1",
    "producttype": "other",
    "isAddon": false,
    "action": "ConfigOptions"
}

main code:

<?php

if (!defined("WHMCS")) {
    die("This file cannot be accessed directly");
}

function perstashoplancher_MetaData()
{
return array(
        'DisplayName' => 'some str',
        'APIVersion' => '1.1',
        'RequiresServer' => true
    );
}

function perstashoplancher_getallpackages($params)
{
return array('test' => 'Test', 'test1' => 'Test1');
}


function perstashoplancher_ConfigOptions($params)
{

    return array(
        "package_name" => array(
            "FriendlyName" => "some str",
            "Type" => "text",
            "Size" => '25',
            "Description" => "some str",
            'Loader' => 'perstashoplancher_getallpackages',
            "SimpleMode" => true
        ),
        // another fields...
     );
}

_TestConnection() function

I can't get the "_TestConnection()" function to work as described here: https://github.com/WHMCS/sample-provisioning-module/blob/master/modules/servers/provisioningmodule/provisioningmodule.php#L381

I return an array just like the example shows, but if I press the "Test Connection" button in the server settings, a loading wheel next to the button spins indefinitely. I know my code is executing fine, because I can use the "logModuleCall()" function to log expected values to the module debug log right before I return the array.

I also notice that "_TestConnection()" is not listed as a supported function in the documentation: https://developers.whmcs.com/provisioning-modules/supported-functions/

It seems like something about this function isn't documented right.

Add-On Feature

Hello,

i'm missing any documentation or example about the "Add-On Feature" function, which is available since whmcs 8.2.

Change params in _CreateAccount(array $params)

In my provisioning module, i want to create an object in a database.
I have to save the objectId of this object for downgrade/upgrades for example.

How can i save a new field in this function ?

UpdateModuleConfiguration on Provisioning Module?

Hello,

Is there any way we can update Provisioning Module's Configuration Options programmatically? Like querying localAPI

Something Like

$command = 'UpdateModuleConfiguration';

$post_data = array(
    'moduleType' => 'provisioning',
    'moduleName' => 'modulename',
    'parameters[configoption1]' => 'some new value'
);

$admin_username = 'admin';

$result = localAPI($command, $post_data, $admin_username);

Thanks!

composer.json file is essentially useless

It would be really awesome, if WHMCS would be downloadable via composer, and you could define all your own modules using compose.json... this would actually make updating WHMCS even easier for people who use their own implemented modules and use of additional vendor components also.

That also means that please restrain your original composer.json and composer.lock as well..(since it is effectively public.. everyone already knows that you use composer.. stop hiding that

ConfigOptions missing input parameters

The provisioningmodule_ConfigOptions function don't have input parameters, or not at least the full list of them.

It will be very easy for the developers if some of the server connection parameters are passed in this function to, so we could avoid manually fetching server connection data and decryption it's password.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.