Jump to content

hosthuski

Member
  • Posts

    10
  • Joined

  • Last visited

About hosthuski

Recent Profile Visitors

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

hosthuski's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. PDOException: SQLSTATE[22007]: Invalid datetime format: 1292 Truncated incorrect DOUBLE value: '' in .../public_html/modules/addons/BillingExtension/core/Katamaze/Uploads.php:367 Stack trace: #0 .../public_html/modules/addons/BillingExtension/core/Katamaze/Uploads.php(367): PDOStatement->execute() Please help?
  2. I continue to have this problem across multiple clients. Client's credit card expires/doesn't work anymore so they add a new one as a payment method through the same gateway (Stripe) as the previous card. WHMCS attempts (and defaults on a per-invoice basis) to the old card and it fails payment despite the new card being added. Client makes a ticket with support saying their invoices are failing even though their card is newly added. I look and see the invoices failing to charge are trying to charge the old payment method and I then have to manually capture with the default payment method to get it to stop. Is there a setting somewhere that I have to change to get this to work how it should be? Expected behavior: when client adds new payment method and makes it DEFAULT, this payment method should be charged on any invoice including unpaid ones. Actual behavior: when client adds new payment method and makes it DEFAULT, this payment method is ignored and NOT charged on any invoice, without manual intervention.
  3. This is EXACTLY what I needed! Thank you. Everything works perfectly 2022.
  4. oops! I accidentally erased "else" thinking it was "exit." don't worry. you were perfectly clear. it's fixed now. that's embarassing. <?php add_hook('AcceptOrder', 1, function($vars) { $serviceid = $vars['serviceid']; if (isset($vars['domain']) and !empty($vars['domain']) and isset($vars['serviceid']) and in_array($serviceid, ['10','11','12'], true ) ) { if (function_exists("exec")) { exec("/path/to/bash.sh ".$vars['domain'], $Output, $result_code); // Shell scripts should return "0" when successful and any other number when failed if ($result_code === 0) { return true } else { throw new Exception("Maintenance plan failed to provision automatically. Manual setup required."); } } } });
  5. Thanks! Fixed it. <?php add_hook('AcceptOrder', 1, function($vars) { $serviceid = $vars['serviceid']; if (isset($vars['domain']) and !empty($vars['domain']) and isset($vars['serviceid']) and in_array($serviceid, ['10','11','12'], true ) ) { if (function_exists("exec")) { exec("/path/to/bash.sh ".$vars['domain'], $Output, $result_code); // Shell scripts should return "0" when successful and any other number when failed if ($result_code === 0) { exit; } return true { throw new Exception("Maintenance plan failed to provision automatically. Manual setup required."); } } } });
  6. <?php add_hook('AcceptOrder', 1, function($vars) { $serviceid = $vars['serviceid']; if (isset($vars['domain']) and !empty($vars['domain']) and isset($vars['serviceid']) and in_array($serviceid, ['10','11','12'], true ) ) { if (function_exists("exec")) { exec("path/to/bash.sh ".$vars['domain'], $Output, $result_code); // Shell scripts should return "0" when successful and any other number when failed if ($result_code === 0) { exit; } else { throw new Exception("Maintenance plan failed to provision automatically. Manual setup required."); } } } }); Thanks everyone for your help. I've come up with this for my hook code. Does this look like it will be sufficient?
  7. Thank you so much everyone. This is a huge help to get started. That would be great but I don't have a module for this. So I'm hoping to avoid using a module by using a hook instead. In this case, the hook would read what the ID of the product is (to match a product in my products list) and check if it = X. This way when someone buys a specific product (ie: Maintenance) I can run the hook to provision the maintenance. And if it doesn't match a product we want to match, it does nothing.
  8. Hello all. I am hoping you can help me do what I think should be simple for people who have dealt with hooks already. I want to do this: IF a product's ID = x (I imagine this involves getting the product ID from a variable and doing an IF statement in PHP) THEN get the service_domain field (built-in field, not custom field), run a shell script while passing the domain field as a bash variable to be used within the script's execution. Why do I want to do this? This will allow me to begin the process of provisioning maintenance coverage via WP CLI for customers who order a maintenance plan from us. I'll create an additional 2 hooks -- three total so one for each maintenance plan. If I can get the first hook, i can make the others and likely merge them together. I just need a "template" to follow from someone who understands PHP more than on the surface like I do. This ultimately will chain 3 of my servers together. WHMCS server, our cPanel server, and the maintenance server. Any help is appreciated. Would anyone be willing to paste in an effective code sample that I can use?
  9. Thanks all for your responses. Unfortunately nothing I see is addressing our core functionality requirements. I decided to contact a WHMCS module developer for a quote. I may just have to get this built myself.
  10. Hello everyone, this is Andrew, founder of Host Huski, a SmallDot company (smldt.co). I've been using WHMCS for over 2 years to provide account management and billing for my server which has passed over 220 unique sites under management. With this tiny milestone I'm trying to take things more seriously with my hosting business and i've just joined the community site here. I've loved WHMCS and how easy it has been to run my hosting with it. hosthuski.com is my website. Thank you.
  11. I am allowing clients to resell my hosting by giving them a reseller account in WHM that is without account creation privileges so that they can only order product at a discount through their client account in WHMCS. I want that when they order a product, that product is created in their WHM account via cpanel API connection for the server i would create just for them in WHMCS. So if Partner A ordered a hosting plan, cPanel would create that account in Partner A's WHM account and not as root. Currently, i cannot assign a product to only be used by a client, or a server to only be used by a client's orders. Any help out there? Or should i pay someone to build this module for WHMCS for me?
  12. Welcome to WHMCS.Community hosthuski! 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