Results 1 to 2 of 2

Thread: Sending WHMCS CustomerId to control panel

  1. #1
    Join Date
    Dec 2007
    Location
    New Jersey/USA
    Posts
    93

    Default Sending WHMCS CustomerId to control panel

    Hello there;

    I downloaded the "Module Development Kit" and I'm surprise with the documentation: One single page

    Well, maybe because it's really simple to create a module, however, i can't find an answer to my question and hope somebody out there can help me:

    Can i send the WHMCS unique "customerid" to my Control Panel on the mymodule_CreateAccount($params) function?

    It has a "clientsdetails" array but comments/documentation says: # Array of clients details - firstname, lastname, email, country, etc...

    So, it doesn't say if the Customer ID is included on the array.
    It should be possible because "i believe" WHMCS will only execute the "_CreateAccount" function after the client has been created.

    The reason i'd like to have WHMCS client's ID on my custom control panel is to allow it to call functions like "Add Billable Item" on WHMCS's API.

    Thanks in advance

  2. #2
    Join Date
    Aug 2009
    Posts
    20

    Default

    Tip:
    When using it add the following:

    print '<pre>';
    print_r($clientdetails);
    print '</pre>';

    Then try to use the module (create button) and it will print an array on the page of all information held in that array. I would assume your looking for ($clientdetails["uid"]) (UserID)

    OR failing that add this:

    $getuid = mysql_query("SELECT * FROM tblclients WHERE email = '".$clientdetails["email"]."'");
    $u = mysql_fetch_array($getuid);
    $clientdetails["userid"]=$u["id"];

    (May need modification as untested).
    vePortal, LLC - One Control Panel, A Million Uses!
    vePortal is a leading OpenVZ Management Solution with Full WHMCS Integration as Standard!

Similar Threads

  1. Best free control panel for WHMCS?
    By maxhost in forum Pre-Sales Questions
    Replies: 4
    Last Post: 01-29-13, 07:44 AM