Jump to content

Disable Credit Cards


Recommended Posts

Hi,

due to one of the latest updates the new payment methods option shows up in the client area.
It is in english, but I guess that is just a missing language file.

My problem: We don't have any payment-gateway that is accepting creditcards. So why would we provide a form to enter credit-card-data? Can I disable that?

And can I add a selfmade payment-module capturing bank-account data? Like for direct debit?
I can't find the option to add a new gateway to one of these groups.

THanks

Link to comment
Share on other sites

15 hours ago, mhermann said:

It is in English, but I guess that is just a missing language file.

using French, the text translate correctly - so it will just be a case of using Language Overrides and updating the appropriate language strings for your language(s).

15 hours ago, mhermann said:

My problem: We don't have any payment-gateway that is accepting creditcards. So why would we provide a form to enter credit-card-data? Can I disable that?

it's enabled by WHMCS thinking you have an applicable gateway... to remove it, you will likely be looking at a hook to remove the links from the navbar/sidebar - or you may be able use CSS to do that (depending on your theme).

15 hours ago, mhermann said:

And can I add a selfmade payment-module capturing bank-account data? Like for direct debit?
I can't find the option to add a new gateway to one of these groups.

if you have an applicable gateway enabled (direct debit being the obvious example), then you/client should be able to add a bank account...

GPPOHBn.png

Link to comment
Share on other sites

Thanks for the reply brian. That is what I ended up doing.

Here is the code in case anyone needs it:

 

use WHMCS\View\Menu\Item as MenuItem;

//Payment-Type Menü ausblenden
add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar)
{
    if (!is_null($primaryNavbar->getChild('Billing'))) {
        $primaryNavbar->getChild('Billing')->removeChild('Payment Methods');
    }
});

//Payment-Type Menü ausblenden
add_hook('ClientAreaSecondaryNavbar', 1, function (MenuItem $secondaryNavbar)
{
    if (!is_null($secondaryNavbar->getChild('Account'))) {
        $secondaryNavbar->getChild('Account')->removeChild('Payment Methods');
    }
});

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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