Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About SeanC

  • Rank
    Junior Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi all, I'm trying to write a hook to automatically cancel tiny disk-space overusage invoices that WHMCS occasionally generates and avoid notifying the customer about them. I saw something similar on these forums using PHP's MySQL API, I took inspiration and re-wrote using the WHMCS API's and have so far written the following: function cancelSmall($vars) { $MIN_VALUE = 0.5; $NOTE = "Amounts under £0.50 are not payable. This invoice has been cancelled"; logActivity("DEBUG: ".print_r($vars, true)); $invoiceId = $vars['invoiceid']; logActivity("DEBUG: invoiceid=".$invoiceId); $invoiceDetail = Capsule::table('tblinvoices')->where('id', $invoiceId)->first(); logActivity("DEBUG: ".print_r($invoiceDetail, true)); logActivity("DEBUG: ".$invoiceDetail->total); if (($invoiceDetail->status == "Unpaid") && ($invoiceDetail->total <= $MIN_VALUE)) { logActivity("DEBUG: Invoice is smaller than minimum value and unpaid!"); $command = 'UpdateInvoice'; $postData = array( 'invoiceid' => $invoiceId, 'status' => 'Cancelled', 'notes' => $NOTE, ); $results = localAPI($command, $postData); logActivity("DEBUG: ".print_r($results, true)); } else { logActivity("DEBUG: Invoice is larger than minimum value or not unpaid!"); } } add_hook('InvoiceCreation', 1, 'cancelSmall'); When testing by generating invoices via the admin panel, the hook runs fine and small invoices are automatically marked as cancelled when they transition from the "Draft" to "Unpaid" status. However, an invoice email is still sent out despite the invoice being marked as cancelled. I am using the "Publish and send email" button, as I assumed this would use the same process as the automated invoice would use. Am I missing something? Thanks, Sean
  2. We've got another bug opened with WHMCS (MODULE-7151) regarding this issue. In our situation, some manual payments are correctly using our custom description string. In other cases, a manual payments is sent as "CompanyName Shopping Cart" instead. We don't enable automated cron payments (yet), all our invoices are paid manually and there doesn't seem to be any pattern it as far as I can see...
  3. I've had a ModulesGarden support ticket open for about three weeks and we've finally got this working. I'm not sure if the reason it took so long was due to a language barrier or not, but we were led down quite complicated paths with Cron jobs & automatic Zone imports etc, none of which worked. It turns out the solution is as simple as putting {$ip} in a Record Set. DNS Manager automatically fills in the field with the IP address of the Plesk node that WHMCS provisioned the hosting plan on. Nothing more complicated than that!
  4. Hi John, Thanks for your reply - Ordinarily, if we wanted customers to use the DNS server provided by Plesk, then this would work. However, we need to run a more robust centralised DNS service that works across multiple servers. On our Plesk nodes, the DNS module is not installed/enabled, and our provisioning system would need to create DNS records that point at the the Plesk node that was chosen for the hosting. I've currently got WHMCS up and running and provisioning hosting on some test Plesk nodes. I've also installed the ModulesGarden DNS Manager which supports external DNS servers, in this case a small PowerDNS cluster. However, I've not yet figured out how to make a domain name point at the relevant Plesk node IP address. Anyone have any clues? Thanks, Sean
  5. Ok - I'm getting somewhere. At the moment I can only get this to work as follows: 1. In WHMCS, create the configurable option as a "Drop-down". Create each individual disk space option and give it a unique name, eg "Extra Disk Space 1GB". 2. In Plesk, Create multiple Service Plan Add-on's with names that correspond to the drop-down name created in step 1. This is horrible! I originally wanted to provide a slider from 0GB to 100GB that allows a customer a highly customisable disk space upgrade. Having to create a massive list of drop-down entries and then another set of Plesk add-on's just isnt feasible. Surely there's a better way?
  6. Hi, I'm currently configuring a test installation of WHMCS and a couple of Plesk Onyx nodes. I can successfully order a hosting plan and have it provisioned on one of the Plesk nodes. However, I'm unable to get "additional disk space" as a configurable option to work. I've followed the documentation for the Plesk module and the Configurable Options page, but I just can't get it to provision successfully. So, first of all I've got some service plans and a service plan addon called "Extra Disk Space" configured in Plesk. In WHMCS I've created a configurable options group: If I place an order for a hosting plan and choose a 5GB disk space upgrade, I see the plan itself get created ok, but the disk upgrade fails. It looks like WHMCS is asking Plesk for a service plan upgrade called "5" rather than "Extra Disk Space" x 5. Here's the modules log: Query: <?xml version="1.0" encoding="UTF-8"?><packet version=""><!-- Copyright 1999-2016. Parallels IP Holdings GmbH. --> <service-plan-addon> <get> <filter> <name>5</name> </filter> </get> </service-plan-addon> </packet> Reply: <?xml version="1.0" encoding="UTF-8"?> <packet version=""><service-plan-addon><get><result><status>error</status><errcode>1013</errcode><errtext>There is no such a service plan</errtext><name>5</name></result></get></service-plan-addon></packet> Has anyone else managed to get this working? Thanks, Sean
  7. Thanks for the offer Nick - We've already been granted a temporary license by your enterprise sales team. We're investigating the system to see if it'll do everything we need before migrating. Thanks for the Info Alex - This is what I was beginning to suspect. We use a few different registrars, some offer a DNS service (eg Enom) and others dont (eg, Nominet). We'd much rather host our own centralised DNS services that rely on third party services & related fees. I'll contact ModulesGarden and see what they say... Sean
  8. Hi all, I'm currently using a hosting platform that allows customers to purchase domains, Plesk shared hosting etc. We're looking at migrating to a more modern system and are currently considering WHMCS. Our current system consists of a number of Plesk server nodes and a few dedicated authoritative DNS servers. The hosting platform automatically creates DNS records on our authoritative DNS servers that points to the client's Plesk shared hosting, depending whichever Plesk server is least used on creation. The client can also login to their central control panel and alter these DNS records or create more if required. Browsing through the documentation for WHMCS, I don't see any information for enabling DNS management, adding DNS servers etc. So, I guess my questions are: - Is this a built-in WHMCS capability? - If not, can a 3rd party module such as those from ModulesGarden provide equivalent functionality? Ie, automatically create DNS records pointing at the server a Plesk shared hosting package has been created, allow client to edit DNS records etc. Thanks in advance, Sean
  9. Welcome to WHMCS.Community SeanC! We're glad you're here please take some time to familiarise yourself with the Community Rules & Guidelines and take a moment to introduce yourself to other WHMCS.Community members in the Introduce Yourself Board.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated