New ISPConfig module for WHMCS

Discussion in 'Tips/Tricks/Mods' started by cwispy, Dec 11, 2014.

  1. BeNeDeLuX

    BeNeDeLuX New Member

    Hi webguyz,
    perfect, SSL was the main problem. I added your bold line in every single SOAP Client connect in the PHP-File.
    So the script works with current git-stable 3.1b1 :) I only recieve this Error by creating a customer:

    Module Command Error
    SOAP Error: no_server_error<br /> http_port_error_regex<br /> https_port_error_regex<br />


    But the customer was created in ispConfig. o_O


    // EDIT
    Looks like there are two new fields in the ispConfig 3.1 DB-Structure
    --> https://git.ispconfig.org/ispconfig/ispconfig3/commit/634d3a71e91d6f2ba8b4bc97df6f766a4f556d43

    So i´m sure that they are missing in the current WHMCS API Script Version.
     
    Last edited: Jun 21, 2016
  2. cwispy

    cwispy Active Member

    BeNeDeLuX likes this.
  3. cwispy

    cwispy Active Member

    Here is a quick hack to support the new http_port and https_port fields in 3.1.
    Code:
    @@ -134,6 +134,11 @@ function ispcfg3_ConfigOptions() {
    'Type' => 'yesno',
    'Description' => 'Tick to create the FTP Accounts '
    . 'automatically during setup'
    + ),
    + 'ISPConfig Version' => array(
    + 'Type' => 'dropdown',
    + 'Options' => '3.0,3.1',
    + 'Default' => '3.1'
    )
    );
    return $configarray;
    @@ -169,6 +174,7 @@ function ispcfg3_CreateAccount( $params ) {
    $defaultlanguage = $params['configoption20'];
    $addmaildomain = $params['configoption21'];
    $addftpuser = $params['configoption22'];
    + $ispconfigver = $params['configoption23'];
    $nameserver1 = $dnssettings[0];
    $nameserver2 = $dnssettings[1];
    @@ -511,6 +517,11 @@ function ispcfg3_CreateAccount( $params ) {
    'added_date' => date("Y-m-d"),
    'added_by' => $soapuser
    );
    +
    + if ($ispconfigver == "3.1") {
    + $ispcparams['http_port'] = '80';
    + $ispcparams['https_port'] = '443';
    + };
    if ( $webwriteprotect == 'on' ) {
    
     
    alex_xwire, BeNeDeLuX and Thaddeus like this.
  4. kevtucker

    kevtucker New Member

    Hi, Installed this Module and followed the Wiki Instructions. Heres my details.

    Debian 8 on Dedicated Server.
    ISPConfig3 Auto Install using Apache.
    ISPConfig3 3.1 Beta2 (Update after install)
    WHMCS 6.3.0
    Now, I had the server connect problem but that was fixed by the SSL fix posted earlier. But now when creating an order I'm getting the dreaded error :

    SOAP Error: customer_no_error_unique<br />

    Tried different installs on different servers with same configuration.

    Anyone know my problem ?

    Thanks. :)

    Kevin
     
  5. webguyz

    webguyz Active Member HowtoForge Supporter

    Double check that the client name was not created on ISPConfig. When first testing and you run into issues it may have already created the client even if it did not complete the entire website.
     
  6. kevtucker

    kevtucker New Member

    Thanks for reply.

    No other clients are there as I ensure all clear before I try accept order. It does create the user but not the website.
     
  7. cwispy

    cwispy Active Member

    There are still a few bugs in 3.1b2. But I can not say that I have come across that one. The customer_no_error_unique error means the id being used for the customer is already in use so it can not be used. This could be because there is invalid data in your ispconfig database from when you were testing. You might need to manually check the ispconfig database.
     
  8. kevtucker

    kevtucker New Member

    Well i'll try wait for an update.

    Its just after i create the demo order using product link with domain i go into whmcs to accept the order and by this time ispconfig3 has the user created. I then click Accept Order in whmcs then i get duplicate username error and customer number error. I then change the username in the order but then i get the customer number error.
     
  9. cwispy

    cwispy Active Member

    The account is created with the ID of the product as its created in WHMCS so you cant just change the username in WHMCS and click create again, as it will not work. You have to click terminate first and then click create again.
     
  10. kevtucker

    kevtucker New Member

    So after creating a new order i go to the order page without changing anything then press Accept Order and just get this error

    [​IMG]
     
  11. cwispy

    cwispy Active Member

    Which means the id and username are both in ispconfig already. You might have to check the sql database for ispconfig to make sure nothing has been left behind by a previous account that you might have deleted.
     
  12. kevtucker

    kevtucker New Member

    Yes it is been added to ispconfig as soon as I click confirm order in the cart then I get the three emails about payment. So shouldn't it be added after I click accept order ?
     
  13. cwispy

    cwispy Active Member

    The emails you get from whmcs have nothing to do with the module or creating the service in ispconfig. If the username and product id are already in use in ispconfig, it will always give you an error.
     
  14. kevtucker

    kevtucker New Member

    OK so the user is created in ISPConfig at the point after the user has used the Checkout. I then go into WHMCS to accept the order and I get the errors. Ive tried many different usernames and emails so this has confused me. Cannot find any old usernames in database and my ISP Config has no clients in there.
     
  15. kevtucker

    kevtucker New Member

    Is there anyone who knows anything about my problem and could take a look at my setup ?

    Thanks.
     
  16. webguyz

    webguyz Active Member HowtoForge Supporter

    Have you activated the module debug in WHMCS and then looked at the WHMCS Log -> Module activity after a run to see if it gives you any kind of info?
     
  17. Thaddeus

    Thaddeus New Member

    @kevtucker What is your product configuration setting?
    [​IMG]
     
  18. kevtucker

    kevtucker New Member

    To Automatically Setup the Product as soon as an order is placed.

    Should it be the third option ? Then the user would not get created until i manually accepted the order ?

    I'll give it a try now.

    Thanks
     
  19. kevtucker

    kevtucker New Member

    Ah, looks like it has not been setting up correctly as when i change to accept manually i get this error :

    Screen Shot 2016-07-15 at 08.38.48.png

    and the Product is setup just as the Wiki image is.
     
    Last edited: Jul 15, 2016
  20. cwispy

    cwispy Active Member

Share This Page