Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


steven99 last won the day on July 10

steven99 had the most liked content!

Community Reputation

113 Excellent


About steven99

  • Rank
    Level 2 Member

Recent Profile Visitors

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

  1. So to confirm you're using the built-in Stripe module and not a custom one? The gateway logs isn't showing any of that activity either? I would be curious to know what the POST contents were. Doing a ClientAreaPageCreditCardCheckout hook with session and other checking might help on that.
  2. I would go off a client custom field so it could be dynamic and no hard coding of ids. You would need to check what the notification is and if it is auto response then abort and if not just continue.
  3. You can leave the access hash field blank unless you have created an API token as described in this plesk article. If you did do a api token, then you would put that in to the access hash. The username and password would be an administrator username and password. I would recommend to use an additional admin user and not the main / your admin user.
  4. The hook mentioned there was to send a copy of all replies in a single message using the EmailPreSend hook and that may work but wont be a thread. What you need is the different email headers sent along to make messages thread-able and I don't think you can add headers via hooks. The ticket system in whmcs is really limited compared to a dedicated system like SupportPal.
  5. Using the AfterRegistrarRegistration hook and internal classes, you should be able to do that with: <?php use WHMCS\Domain\Domain; add_hook('AfterRegistrarRegistration', 1, function ($vars) { $Domain = Domain::find($vars['domainid']); if ($Domain) { $Domain->hasDnsManagement = true; $Domain->save(); } }); Have not tested that, just what should work.
  6. Don't think there is out of the box and don't think there is an admin template for the client list. An injection hook could be used perhaps but would need to match up row to row or use the color of td's background to output the group.
  7. API doesn't seem to have rating so you'll need to do database edits in the tblticketreplies table -> rating column.
  8. Well, that might be the case but still using internal classes and expanding on that: <?php //@author: steven99 function getOrderByInvoiceId($invoiceID) { $Invoice = Invoice::find($invoiceID); if ($Invoice) { if (isset($Invoice->order->id) and $Invoice->order->id) return [$Invoice->order->id]; else { //Ugh, we need to find it. $OrderIDs = []; foreach($Invoice->items as $item) { //Is it an addon item? if ($item->addon) $OrderID = $item->addon->orderid; //Is it a service item? elseif ($item->service) $OrderID = $item->service->orderid; //is it a domain itme/ elseif ($item->domain) $OrderID = $item->domain->orderid; if (!in_array($OrderID, $OrderIDs)) { $OrderIDs[] = $OrderID; } } return $OrderIDs; } } else return [] }
  9. You could enable 2FA but they would need to complete the actual setup steps for it to be required. A client custom field, require2FA, and a hook checking that and 2FA status could be done to redirect them to the 2FA setup page on any page loads. A quick search of the marketplace and on here didn't find a module or hook to do this however. With that said, personally if a client was constantly doing payment disputes they would no longer be a client.
  10. Don't think that is possible out of box. Using the ShoppingCartValidateCheckout hook you could check if a hosting package or one within a group or any other items besides registration is in the cart and if not return an error.
  11. Internal classes have this: $Invoice = Invoice::find($InvoiceNumber); if ($Invoice and isset($Invoice->order->id) and $Invoice->order->id) $OrderID = $Invoice->order->id;
  12. Okay, well pick a hook that suites when you want to run and go from there. https://developers.whmcs.com/hooks/hook-index
  13. Code to do validation, escaping, etc is extra but yup would agree.
  14. When do you want the hook to fire? Let's say after the server modules does the create: <?php add_hook('AfterModuleCreate', 1, function($vars) { if (isset($vars['domain']) and !empty($vars['domain'])) { if (function_exists("exec")) { exec("/path/to/script/shell.sh ".$vars['domain'], $Output, $result_code); // Shell scripts should return "0" when successful and any other number when failed if ($result_code === 0) { // Yay, we are successful, now process output if really wanted foreach($Output as $line) { if ($line === "some output") { // Run more processing } } } else { throw new Exception("Uh oh batman, the joker got away"); } } else throw new Exception("Dude, the security here is nice but we can't do anything"); } else throw new Exception("Uh oh, domain isn't given and it should be but it isn't but it reallly should have been!!!"); }); Just note shell_exec, exec, and the other such functions can be disabled for security and so that is the case you would need to have that removed for this to be possible.
  • 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