Jump to content


Senior Member
  • Content count

  • Joined

  • Last visited

Community Reputation

2 Neutral

About J-B

  • Rank

Recent Profile Visitors

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

  1. J-B

    Checkbox for GDPR - v7.8.x

    Thank you, it works! But, for me, the matter has settled. The contact form is not compatible with the ticket system. If the e-mail is imported in the ticket system, the sender is not displayed. For WHMCS ist not a bug, it is a feature. 👏 I redirect my contact Site to the WordPress Site, in WordPress it works fine.
  2. J-B

    Checkbox for GDPR - v7.8.x

    FYI this hook isnt working too.
  3. Hello, Unfortunately, I have to open a new topic because the other one was closed. The code from @brian!, to get a checkbox for GDPR reason is not working anymore in WHMCS 7.8.x. Does anyone have an idea why? <input type="checkbox" required name="gdprconsent" oninvalid="this.setCustomValidity('{$LANG.ordererrords}')" oninput="setCustomValidity('')"> I consent blah blah
  4. A customer want to pay his invoice with a American Amex. When he want to pay he get this error: Why is here no exact error message? In the error logs are: [Mon Oct 07 17:31:41.479493 2019] [proxy_fcgi:error] [pid 7541:tid 140059963561728] [client] AH01071: Got error 'PHP message: [WHMCS Application] ERROR: Stripe\\Error\\InvalidRequest: The zip code you supplied failed validation. in /var/customers/webs/whmcs/vendor/stripe/stripe-php/lib/ApiRequestor.php:210 from API request 'req_QVxBcyh4Acmw0T' Stack trace: #0 /var/customers/webs/whmcs/vendor/stripe/stripe-php/lib/ApiRequestor.php(173): Stripe\\ApiRequestor::_specificAPIError('{\\n "error": {\\n...', 400, Object(Stripe\\Util\\CaseInsensitiveArray), Array, Array) #1 /var/customers/webs/whmcs/vendor/stripe/stripe-php/lib/ApiRequestor.php(473): Stripe\\ApiRequestor->handleErrorResponse('{\\n "error": {\\n...', 400, Object(Stripe\\Util\\CaseInsensitiveArray), Array) #2 /var/customers/webs/whmcs/vendor/stripe/stripe-php/lib/ApiRequestor.php(126): Stripe\\ApiRequestor->_interpretResponse('{\\n "error": {\\n...', 400, Object(Stripe\\Util\\CaseInsensitiveArray)) #3 /var/customers/webs/whmcs/vendor/stripe/stripe-php/lib/ApiOperations/Request.php(57...', referer: https://www.domain.xy/whmcs/creditcard.php?invoiceid=1490 Any idea?
  5. I updated to the latest version today and I find a new bug. In the Language Files are links for example: The link really shows up to https://mydomain/submitticket.php and not corretly to https://mydomain/whmcs/submitticket.php. I have try with <a href=\"{$WEB_ROOT}/submitticket.php\"> but no luck. If I try: <a href=\"whmcs/submitticket.php\"> it makes https://mydomain/whmcs/whmcs/submitticket.php I hope you understand the problem 🙂
  6. Yeah, this was the mistake! You are my hero 💪
  7. Hi @brian! thanks for your help, but your code dont work. I always see the Paypment "stripe". Have any idea why?
  8. I am not a programmer. Can you tell me how to do it?
  9. <?php if (!defined("WHMCS")) die("This file cannot be accessed directly"); use Illuminate\Database\Capsule\Manager as Capsule; function checkIfCanUseCC($vars) { global $_LANG; $errormsg = array(); $number_of_results = Capsule::table('tblinvoices')->where('userid', $_SESSION['userid'])->where('status', 'Paid')->count(); if ($number_of_results == 0 && $_SESSION['cart']['paymentmethod'] == "stripe") { $errormsg = $_LANG['firstpaymentnocc']; } return $errormsg; } add_hook('ShoppingCartValidateCheckout', 1, 'checkIfCanUseCC'); ?> Can anyone tell me why this hook sometimes works and sometimes not? On my dev it works fine, but customers say they can not pay even though they have more than 1 successful payments in the database. It the "ShoppingCartValidateCheckout" wrong to disable a payment on checkout? Or is it a Bug in WHMCS 7.5.2?
  10. This code is not working too. Zero Invoices is sending again to the customers. Any other solution?
  11. Hey @Kian thanks for your Support! I will try it.
  12. Hi, I have a hook (its not from me) that disable sending 0.00 invoices. <?php use Illuminate\Database\Capsule\Manager as Capsule; function disable_00_invoices($vars) { $email_template_name = $vars['messagename']; # Email template name being sent $relid = $vars['relid']; # Related ID it's being sent for - client ID, invoice ID, etc... //Checking for certain template name, if so - this is our case if ($email_template_name == "Invoice Created" || $email_template_name == "Invoice Payment Confirmation") { //getting total of the invoice $data = Capsule::table('tblinvoices')->where('id',$relid)->first(); //if it is equal to '0.00' we disable email sending if (isset($data->total) && $data->total == '0.00') $merge_fields['abortsend'] = true; } return $merge_fields; } add_hook("EmailPreSend",1,"disable_00_invoices"); ?> This hook works great, but it disable invoice that is paid via credit too. I have try ... if (isset($data->total) && $data->total == '0.00') && (isset($data->credit) && $data->credit == '0.00') But this code isnt working. Anyone a idea how I can disable only 0.00 total invoices and not invoices that is paid via credit?
  13. $_SESSION['cart']['paymentmethod'] is the solution 😵 Thanks, can be closed!
  14. $number_of_results = Capsule::table('tblinvoiceitems')->where('userid', $_SESSION['userid'])->where('invoiceid', '>', '1')->count(); if ($number_of_results == 0 && $paymentmethod == 'banktransfer' ) { But can anyone explain me why $paymentmethod is undefined? https://developers.whmcs.com/hooks-reference/shopping-cart/#shoppingcartvalidatecheckout the the doc is "paymentmethod string The selected payment method". Why is paymentmethod not the selected payment method? 🧐

Important Information

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