Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 08/28/22 in all areas

  1. 1 point
    Put the hook file in to WHMCS_install/includes/hooks.
  2. 1 point
    Hello, Try this: <?php /** * Stronger Password Generator for WHMCS Provisioning v3 * * @package WHMCS * @copyright Katamaze * @link https://katamaze.com * @author Davide Mantenuto <info@katamaze.com> */ use WHMCS\Database\Capsule; add_hook('OverrideModuleUsernameGeneration', 1, function($vars) { $length['digit'] = '3'; // Number of digits in password $length['lower'] = '4'; // Number of UNIQUE lowercase characters in password $length['upper'] = '4'; // Number of UNIQUE uppercase characters in password $length['special'] = '2'; // Number of special characters in password // The same character cannot be used more than once (case sensitive) if ($length['lower'] + $length['upper'] == '26') { $length['lower'] = '13'; $length['upper'] = '13'; } $digits = '0123456789'; $chars = 'abcdefghijklmnopqrstuvwxyz'; $special = '!@#$%^&*?'; // Plesk does not consider (, ), -, = and + as special characters $digits = substr(str_shuffle($digits), 0, $length['digit']); $lower = substr(str_shuffle($chars), 0, $length['lower']); $upper = substr(str_shuffle(strtoupper(str_replace(str_split($lower), '', $chars) )), 0, $length['lower']); $special = substr(str_shuffle($special), 0, $length['special']); $password = str_shuffle($digits . $lower . $upper . $special); Capsule::table('tblhosting')->where('id', $vars['params']['serviceid'])->update(['password' => Encrypt($password)]); });
  3. 1 point
    I used the Apache directive from the following page I found in a Google search: https://geekflare.com/secure-apache-from-clickjacking-with-x-frame-options/ There is also a link to a "Header Checker" tool, that will verify if your site has the correct header implemented.
  4. 1 point
    Since you mentioned purchasing an extra month, I am guessing you do not mean the typical recurring monthly setup that is possible per product? Instead you want to do early renewals basically where a client can renew a service for 1, 2, 7 more months ahead of time? If so, beyond using the Add funds option, I don't think that is possible out of box. Would be possible via a custom addon with a hook or maybe even just a hook. A server module if coded to support such a setup could do it but most if not 99.9% wont be coded to do that.
  5. 1 point
    Hi. If you wish to "never show the subscription payment button", then you will want to stick with the PayPal Basic module. The new module PayPal Checkout module will force subscriptions: https://docs.whmcs.com/PayPal_Checkout#Limitations_and_Restrictions
  6. 1 point
    Yes, you can: there's just a single field in tbldomains that shows if a domain is premium or not... nit this is useful just for renewals, because it works only after a domain has been inserted in tbldomains, that's to say after it has been ordered. To manage the order as Premium, I guess you should code in cart, identifying a domain as Premium, correcting the price, and explaining to the customer that he's going to register a Premium domain... BTW: also Hexonet manages premium domains: https://centralnic-reseller.github.io/centralnic-reseller/docs/hexonet/whmcs/whmcs-ispapi-registrar/
  7. 1 point
    See if this thread from Brian! has what you're looking for
  8. 1 point
    Try to register a new user account on your own WHMCS. When you're asked for "first name", insert a random text, whatever length... i.e. something like this: Use the very same text also for surname. And for company name. And for address, and for whatever field does not check the data you inserted. And for email a fake address on a non-existing domain. It's not a joke: You'll be able to register a new account with those crazy data, because: 1- WHMCS does not check the data in any way 2 - the data are saved in db using a "text" type field for each one... and this means that the limit of a name, or of a surname, is 65535 chars Question: how many people has a name long 65535 chars? How many surnames long 65535 do you know? This is more than an issue, because i.e. in an attack it may be used to register hundreds of fake users, each using a huge amount of data, and bringing your db dimensions out of limits. Or registering using long string and special chars may bring your template going crazy... But you can also register using near-real data, but a disposable email address, and use this disposable email address to commit fraud (i.e., buying services using cloned credit cards). So I created a "check user data hook" that: 1 - limit the length of any field you can insert to 150 chars 2 - check the email address, in order not to allow registering using disposable addresses or on non-existing domains The hook is available for free on Github ( https://github.com/DomainRegister/WHMCS ) or on DomainRegister's site: https://domainregister.international/index.php/knowledgebase/696/Check-User-Data-for-Better-WHMCS-Security.html Credits: thank to @bear and @leemahoney3 for the help in silly bug hunting...
  9. 1 point
    @leemahoney3Yes! Good call. It was the WHMPress 'Helper' AddOn. Deactivating that solved the redirect problem. Now I have to get with their tech support to find out why. Thanks!
  10. 1 point
    Hi sol2010, Take it this doesn't work anymore? I can update it if you wish.
  11. 1 point
    Is anyone using this new ox app suite that is now available in the marketconnect ? Almost all the reviews of the app on the play store saying it is useless , buggy and not working most of the time. Not sure if this is just problems with the app or the email service in general.
  12. 1 point
    Hi there, A redirect loop occurs when a website instructs your browser to redirect to a page, which then instructs your browser to redirect to a different page. This continues until your browser stops redirecting and signals that a redirect loop has occurred. This number varies from browser to browser, but is often about 21. Typically, this is the result of a misconfiguration on the website or server. We have a Troubleshooting a Redirect Loop guide that explains some probable causes and resolution steps for this issue. Checking WHMCS Configuration Checking mod_rewrite Rules .htaccess Cloudflare SSL For detailed troubleshooting instructions, visit https://help.whmcs.com/m/troubleshooting/l/802231-troubleshooting-a-redirect-loop
  13. 1 point
    Hi @LeMarque, Though WHMCS doesn't currently have this functionality built in, it would be possible to achieve this using hooks. Alternatively, you could simply give your clients more time to complete payment by extending the Order Days Grace option, and then instruct them to only pay once you have sent them these materials. Should you want to go down the hooks route, you would essentially need to stop an invoice being generated for new orders of a particular product, and then generate the invoice once you accept the order (and link it back to the order). Another user suggested a similar solution for another community member a few years ago. You might want to check out our Service Offers and Requests forum, where somebody may be able to develop this functionality for you. You may also want to open a feature request. Hope this helps a little! Josh
  14. 1 point
    I chalk it up to spell check, my arch nemesis. 😉 (seriously, Android...you changed Kayden to Valusia? How is that even close?)
  15. 1 point
    @bear and @leemahoney3, thanks!!!! (I want an A.I. based code editor, in order to remedy my natural stupidity... 😀 )
  16. 1 point
    As requested 🙂 Create a file in your /includes/hooks/ directory and add the following code: <?php use WHMCS\Carbon; use WHMCS\Database\Capsule; if (!defined('WHMCS')) { die('You cannot access this file directly.'); } function cron_capture_payment($vars) { # How many days before the due date you wish to capture payment # e.g. if set to 3 and todays date is 6th Sept, only unpaid invoice due on the 9th Sept will be checked $daysBeforeDueDateToCapture = 0; # What hours of the day you wish to capture payment (e.g. '06' is 6am, '18' is 6pm) $captureTimes = ['00', '06', '12', '18']; # If you only want to capture payments on certain payment methods, add them here (e.g. 'stripe', 'paypalcheckout') $allowedPaymentMethods = []; # If enabled and the capture fails, log the error in the clients log $logErrors = true; /* ------------------------------------------ */ /* ONLY EDIT VARIABLES ABOVE THIS LINE */ /* ------------------------------------------ */ # Grab the current time (only the hour needed) $currentTime = Carbon::now()->format('H'); # Check if the current hour is in the $captureTimes array if (in_array($currentTime, $captureTimes)) { # Calculate the due date based on the $daysBeforeDueDateToCapture variable $theDueDate = Carbon::now()->addDays($daysBeforeDueDateToCapture)->format('Y-m-d'); # Grab all unpaid invoices that match the due date $invoices = Capsule::table('tblinvoices')->where('duedate', $theDueDate)->where('status', 'Unpaid')->get(); # Loop through the invoices foreach ($invoices as $invoice) { # If the $allowedPaymentMethods is not empty, check that the invoice's payment method is in it if (!empty($allowedPaymentMethods) && !in_array($invoice->paymentmethod, $allowedPaymentMethods)) { return; } # Attempt to capture payment $result = localAPI('CapturePayment', [ 'invoiceid' => $invoice->id ]); # If $logErrors is true and an error is present, log it to the clients log if ($result['result'] === 'error' && $logErrors) { logActivity("Automatic payment capture hook failed on invoice #{$invoice->id}: {$result['message']}", $invoice->userid); } } } } add_hook('AfterCronJob', 1, 'cron_capture_payment'); Basically the hook runs every cron job (make sure your cron job is set to frequently run) and if it meets certain parameters, it attempts capture on the invoices. The parameters are: If the invoice is unpaid If the current hour (that the cron job runs) matches that in the $captureTimes array If the due date on the invoice matches the due date calculated by the $daysBeforeDueDateToCapture If the payment method on the invoice matches one provided in the $allowedPaymentMethods array (if the array is empty, all payment methods are accepted, can use this to prevent unnecessary captures) I've added comments to the code to help you better understand how it works and how the variables above are to be configured to ensure the hook runs correctly. I've also added the $logErrors variable, if true and the capture attempt fails, a log entry will be made for the invoice owner. Any issues, let me know.
  17. 1 point
    Actually, I discussed this issue on a support ticket and Direct Debit option does not show up in the payment methods section until a customer has activated it on an open invoice. Once they have set up a DD mandate, then the option shows. However, I think it would be sensible to have the option showing regardless, perhaps with a note that explains how a customer can utilize it. I guess it's going to require some custom coding to correct this undersight.
  18. 1 point
    Yeah should be https://api.mailcheck.ai/email/ and not https://api.mailcheck.ai/eamail/
  19. 1 point
    I'd suggest contacting the module developer for further assistance.
  20. 1 point
  21. 1 point
    So, basically no option? That request system is entirely ignored.
  22. 1 point
    Rad Web Hosting is pleased to announce the release of WHMCS VPS Reseller Module v1.0.5. Update details: https://blog.radwebhosting.com/whmcs-vps-reseller-server-module-v1-0-5-released/
  23. 1 point
    WHMCS have confirmed previously that the getadminpermsarray is not part of the stock code, its related to a module. Do you have any third party modules installed? If so, delete them one by one until the error goes away to find out the offending module. You'll then need to contact the vendor of that module for assistance. https://whmcs.community/topic/309142-cannot-redeclare-getadminpermsarray-in-0-when-emailing-piping/
  24. 1 point
    Hi Craft, Thanks for the coffee! Much appreciated. If you find the addon does not work as intended, or need it tweaked, then let me know.
  25. 1 point
    Heya Craft, So I was thinking, the whole 10 days thing doesn't really make sense as you'd be generating the next invoice automatically already, right? So long as the service is updated straight at the end of the cart, the next invoice that gets generated (within the free month) would be for the new Annual price. If this doesn't suit, I can create another hook to check and generate, though this might conflict with your invoices that are already being generated. Anyways on to the hook, first create a new coupon code (e.g. FREETRIAL) and set it to 100%, you can configure which product you want it to apply to if you wish, and ensure to set it to be applicable to monthly payments only. Use the option to limit it to once per client. Once you have that done, create a new php file in your /includes/hooks/ folder and add the following code: <?php <?php use WHMCS\Carbon; use WHMCS\Database\Capsule; function free_trial_for_product($vars) { $promoCode = 'FREETRIAL'; // The exact promo code that you use for the free trial (must be 100% and best to be only applicable to the relevant products and set to one time use per client and order) $applicableProducts = [1,2,3]; // Product ID's separated by commas (can find the ID's in the tblproducts database table) /* ----------------------------------------------------------- */ # Grab order details and a list of related services $orderDetails = Capsule::table('tblorders')->where('id', $vars['orderid'])->first(); $services = Capsule::table('tblhosting')->where('orderid', $orderDetails->id)->get(); # Loop through each service foreach ($services as $service) { # Only run the code below if the product is in the array above if (in_array($service->packageid, $applicableProducts)) { # Grab the promo code $orderPromoCode = $orderDetails->promocode; # Only run the code below if the code matches the one specified above if ($promoCode == $orderPromoCode) { # Grab the pricing for the product $getPricing = Capsule::table('tblpricing')->where('type', 'product')->where('relid', $service->packageid)->first(); # Update the service so its set to the new billing cycle, amount and the next due date is correct (as WHMCS updates this to a year from the date automatically) Capsule::table('tblhosting')->where('id', $service->id)->update([ 'billingcycle' => 'Annually', 'amount' => $getPricing->annually, 'nextduedate' => Carbon::now()->addMonth()->format('Y-m-d'), ]); } } } } add_hook('ShoppingCartCheckoutCompletePage', 1, 'free_trial_for_product'); (Excuse the formatting of the comments in the code, the community is doing this) Replace $promoCode with the code you've created and add the product ID's for the relevant products you want this to work on in the $applicableProducts array (separated by commas, can find the ID's in the tblproducts database table) That's basically it, when the client adds the relevant product to their cart, chooses monthly payment and enters the correct promo code, it will change the total to zero. The hook will then run on the completed cart page and will update the billing cycle to Annually on the product and set the correct amount (that you've set for annual payments) as well as the correct next due date (a month from the date the order is placed). What didn't work: So WHMCS generates the order confirmation email and there is no hook before this is generated to update the details before the email is sent. Due to this, the order confirmation email will show the billing cycle as Monthly and the amount as the monthly amount. My hook kicks in after this is sent so the values are not true and do not reflect the new values. I can't see anyway around this unfortunately, I cannot reference the order ID before the email is sent as the only hook available is the PreShoppingCartCheckout hook and that's before the order is created. The PreEmailSend hook needs the order ID, so thank you WHMCS... 🙄
  26. 1 point
    Hi tuga, This would be possible with the EmailPreSend hook, you can simply merge your additional variable into the relevant email templates. For example, say you wanted to add the variable $myCoolVariable, open email templates in WHMCS by going to System Settings > Email Templates and edit the following templates: Invoice Payment Confirmation Credit Card Payment Confirmation Add the variable to the templates above in the format {$myCoolVariable} Then create a new file in your /includes/hooks/ folder (e.g. addCustomVariableToInvoiceConfirmationEmail.php) with the following code: <?php function add_custom_variable_to_invoice_confirmation_email($vars) { $templates = [ 'Credit Card Payment Confirmation', 'Invoice Payment Confirmation' ]; $messageName = $vars['messagename']; $merge_fields = []; if (in_array($messageName, $templates)) { $merge_fields['myCoolVariable'] = 'This is my awesome and really cool variable!'; } return $merge_fields; } add_hook('EmailPreSend', 1, 'add_custom_variable_to_invoice_confirmation_email');
  27. 1 point
    Hi @rivermobster, Thanks for bearing with me whilst I researched the matter. Currently the largest attachment which our helpdesk will accept in a single request is 8MB, which is why you were able to submit the 3 images between 2.2MB and 4MB individually, but not all at once. I've raised this matter with our website team to be addressed, so that users will get an explanation message instead of being returned to the beginning. In the meantime please keep total attachments on a single message below 8MB. Thanks for taking the time to report your experience and for the follow-ups via PM.
  28. 1 point
    Changing the template would be the best option for this. You could use ClientAreaFooterOutput hook and some javascript to change the class would work but you would need to filter down to ids so not to change all panels -- and some don't have ids .
  29. 1 point
    Today we are pleased to announce Lara Session rePlayer (beta) for WHMCS ! Have you ever wondered what experience your clients receive when visiting your website ?!, what errors do they face ?!, how do they navigate your website ?! All these questions and more can now be answered, as this plugin will allow you to record and re-play their entire session, as if you were sitting with them while they navigate your website ! See what confuses them, what attracts their attention and much much more. To make that happen, we blended the power of rrweb opensource recording software and WHMCS, and the Lara Session rePlayer was born. The plugin comes with a lot of exciting features, including but not limited to : Works with any WHMCS client theme. Complete logging of errors and debug events. Record all sessions or limit the number of recording per day (to save disk space). The ability to limit recording size and length (to save disk space). Fully automated clean-up system, to delete old recordings (to save disk space). EU GDPR compliance, by only recording sessions after a consent cookie is set by the user (i.e., after accepting your website's cookie and privacy policy). All recorded sessions will be stored locally on your server, so no user data will be shared with 3rd parties. The ability to mask all inputs, to protect users' privacy. The ability to ignore recording certain input fields by type, name, class or id. Testing mode, where only sessions by logged in admins will be recorded. We are in a closed beta stage, currently testing the plugin and getting feedback from selected beta testers, before releasing the final version. We welcome any feedback or feature request, to make Lara Session rePlayer the one stop solution for recording WHMCS sessions. If you would like to join our beta testers, please open a support ticket at : https://clients.xtraorbit.com/submitticket.php?step=2&deptid=2&subject=Lara-Session-rePlayer-Beta-Tester The beta tester program is only available to our current active customers. If you don't currently have an active account with us, feel free to post your feedback or feature request in this post. You may watch the demo video of the plugin here : Main Screen : Settings Page : Have a lovely day !
  30. 1 point
    The WHMCS.Community is intended to provide a place for users of WHMCS to discuss, share and interact with each other as well as WHMCS Staff. To ensure we maintain a friendly environment, we ask users to respect the following rules and guidelines. Please let us know via the WHMCS.Community Assitance category should you have any questions or comments, posts in this category are visible between yourself and the WHMCS.Community Team. WHMCS reserves the right to alter these rules from time to time. 1.User Accounts Each person may have (one) 1 forum login regardless of the number of companies you may be part of. Duplicate accounts will be removed from WHMCS.Community Please do not share your user account with others - each person should retain their own username and password Usernames must not be created that contain any of the items listed below: An email address A website address The following words WHMCS cPanel Staff Moderator Admin Any word determined to cause offence or be deemed inappropriate. Usernames or Users that do not comply with these rules may be removed from WHMCS.Community 2. Behaviour on the Community We expect all users to be friendly and polite. While we understand that users will disagree and have different points of view at times, this can be communicated in a civil manner Please do not post rude, insulting or inflammatory posts. Personal attacks, name-calling and insults will not be tolerated on WHMCS.Community. Profanity and inappropriate images (including porn or gross violence) may not be posted anywhere on the WHMCS.Community. WHMCS.Community Staff & Moderators use their sole discretion as to what is deemed unacceptable behaviour in the community and may remove content at any time. Your posts assist other users, please do not delete content if you find an answer, please share this solution to help other users. 3. Advertising on WHMCS.Community Advertising, offers or self-promotion are to be posted only in the Third Party Add-ons section of the community. Community users seeking to hire a developer may post within the Service Offers & Requests section. Advertising is limited to one advertisement per seven (7) day period on a rolling 7-day basis. Additional or excessive advertising will be removed by the moderation team and your ability to post in advertising boards removed. Soliciting and/or self-promotion via the private messaging (PM) system is strictly prohibited. The sale or reselling of WHMCS Licenses is strictly prohibited on the community. Affiliate and referral links may not be used, these links are those that link to a site and contain information crediting the person with that referral 4. Posting and Moderation on WHMCS.Community The WHMCS.Community is moderated by WHMCS.Community Moderators and Staff. When a post is deemed to be in breach of the rules it will be removed and the user advised via a warning. Please do not cross-post across the community. If your topic is better suited to another section one of the WHMCS.Community team will move it to the best category for you. You may report your post if you wish to have it moved by a moderator. For privacy reasons please do not post any personally identifiable information including Usernames, Passwords, Contact Numbers, Email Addresses and/or Credit Card Numbers As WHMCS.Community is a moderated community we have implemented a Warning System. When a post is removed for breaching the community rules we’ll be sure to let you know. We allocate points to a warning and once you have a set number of points you may be suspended from posting on the community. Users that do not comply with the rules for WHMCS.Community may be banned temporarily. Ongoing temporary bans may result in a permanent ban from WHMCS.Community. The public discussion of moderation decisions is not permitted, these will be removed without notice and may result in a community ban. 5. Signature and Profile Rules Your signature may include links, however, please ensure these are reasonable (no more than 4) and they must not include Referral/Affiliate links. This includes pricing and plan details Signatures may not contain more than 4 lines at a 1024x768 resolution Please do not sell or rent your signature space, your signature is yours alone. Where your signature does not comply with these rules you may be asked to alter or remove it 6. WHMCS.Community Ranks Official WHMCS Staff & Moderators are identified by one of the following ranks located below their profile image, in addition, their posts are highlighted blue WHMCS CEO WHMCS Community Manager WHMCS Customer Service WHMCS Developer WHMCS Marketing WHMCS Staff WHMCS Support Manager WHMCS Technical Analyst WHMCS.Community runs a ranking system, new community members start with the rank of Newbie and can progress based on the number of posts, reputation points and length of time active on the community Some users have a special “Super Users” rank. These members are a select group of elite community members that are long-standing mentors in the community, courteous to other members, always providing technical insight and advice, and generally helping to make our community a better place to learn, troubleshoot and advance. The WHMCS.Community ranking formula is changed from time to time and without notice. The algorithm used is not published or discussed with users to prevent gaming the system 7. Contacting the WHMCS.Community Team You may contact a member of the WHMCS.Community via the WHMCS.Community Assitance board If you would prefer to email you may open a ticket by emailing forums@whmcs.com Thank you for helping to keep WHMCS.Community a great place
  31. 0 points
    You might want to try NameSilo However, NameCheap is also very good at domain registration, but if you are having trouble with NameCheap, you can try NameSilo.
  32. 0 points
    No option from within WHMCS that I can see anyways unfortunately. Spam filter before it hits WHMCS would be a good idea though.
  33. 0 points
    Sadly I don't think there is a way to do this, best option is to submit a Feature Request.
×
×
  • 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