Jump to content
strausmann

GoCardless Usage Questions

Recommended Posts

Hi @WHMCS John,

I can see that this is around a year old but the Topic Title suggests it's the best place to ask these questions.

On 1/22/2019 at 10:11 PM, WHMCS John said:

WHMCS supports storing one set of payment details; local credit card and tokenised storage (eg. Stripe and GoCardless) simultaneously. This means it would not be possible to pay invoices under a single client account both via credit card and GoCardless at the same time. However this is something we're looking to add later in the year: https://requests.whmcs.com/topic/multiple-credit-card-support_1

The above would suggest that this was introduced in v7.8 but the link to Pay Methods (https://docs.whmcs.com/Pay_Methods) states:

Quote

Please Note: At this time, it is not possible to set a different default Pay Method on a per service basis, although this functionality is planned to be delivered in a future update.

1. The first question I have is about the meaning of "per service": I have clients with multiple services within their account and maybe they want a Direct Debit setup on some of them but pay by Credit Card for others. Is this possible?

2. If that is possible, the next question is about onboarding clients: Their current default payment method would be credit card but how would they migrate to Direct Debit?

I guess that the next invoice generated would default to their existing payment method or could they change this when GoCardless was enabled? Or would I have to "invite them" using the GoCardless dashboard or just change their default payment method before then next invoice is generated.

The documentation is fairly basic and covers enabling the module with no real reference to anything else (https://docs.whmcs.com/GoCardless)

3. The last question (for today at least) is around only showing this as a payment method for recurring invoices generated AFTER the initial order has been taken and provisioned? i.e. I cannot see any of my clients placing an order for hosting and then waiting for around a week for it to be provisioned..... however, once they are up and running a Direct Debit may be ideal for them.

Share this post


Link to post
Share on other sites
 
 
 
1
7 hours ago, Vox said:

1. The first question I have is about the meaning of "per service": I have clients with multiple services within their account and maybe they want a Direct Debit setup on some of them but pay by Credit Card for others. Is this possible?

Per service, means per product e.g Hosting Account 1, Hosting Account 2 ect. On the product you can set a Payment Method, however it is still not possible to set a default pay method on a per service method please refer to https://docs.whmcs.com/Pay_Methods for more infromation.

 
 
 
1
7 hours ago, Vox said:

 2. If that is possible, the next question is about onboarding clients: Their current default payment method would be credit card but how would they migrate to Direct Debit?

 I guess that the next invoice generated would default to their existing payment method or could they change this when GoCardless was enabled? Or would I have to "invite them" using the GoCardless dashboard or just change their default payment method before then next invoice is generated.

The documentation is fairly basic and covers enabling the module with no real reference to anything else (https://docs.whmcs.com/GoCardless)

If you would like them to use GoCardless, you'd need to have them set up the mandate on the next available invoice, to do this they would navigate to the invoice, then change the payments method to GoCardless and follow the steps to setup the mandate.

7 hours ago, Vox said:

 3. The last question (for today at least) is around only showing this as a payment method for recurring invoices generated AFTER the initial order has been taken and provisioned? i.e. I cannot see any of my clients placing an order for hosting and then waiting for around a week for it to be provisioned..... however, once they are up and running a Direct Debit may be ideal for them.

Out of the box, there isn't a way to stop this you may be able to acheive this with a hook but this would require a customization

Share this post


Link to post
Share on other sites

Hi @Vox,

Further to Chris' suggestions:

1. Yes this is possible

A client can indeed only have one default payment method. But WHMCS can differentiate between a credit card and direct debit Pay Method, so will pick the appropriate one based upon the invoice's Payment Gateway.

 

3. Depending upon your product configuration Automation Settings, a service may not be automatically provisioned until the payment has cleared. In which case you could accept the order manually to provision it before payment has been received.

You could perhaps make a customisation to the checkout.tpl template to hide the GoCardless option from the Checkout page, so that a client would pay via an instant method upon signup, then follow the steps in #2 for renewals.

Share this post


Link to post
Share on other sites

Hi @WHMCS ChrisD and @WHMCS John,

Thanks for that.

So it would seem the only thing I have to manage is how I would "hide" the Direct Debit option if required.

Share this post


Link to post
Share on other sites

Hi @WHMCS ChrisD,

14 hours ago, WHMCS ChrisD said:

If you would like them to use GoCardless, you'd need to have them set up the mandate on the next available invoice, to do this they would navigate to the invoice, then change the payments method to GoCardless and follow the steps to setup the mandate.

I've now enabled GoCardless.

Any existing invoices for customers still only show the existing credit card payment button and their payment method is still showing on the invoice is credit card (with no option to change this).

There is no way I can see to change this logging in as a customer and having just generated an invoice the GoCardless option is not there. Just the clients default payment method - Credit Card.

Is there something else I need to enable?

Share this post


Link to post
Share on other sites

Hi @WHMCS ChrisD,

Found it.....

Settings > Invoices > Clients Choose GatewayTick to allow clients to choose the gateway they pay with

Share this post


Link to post
Share on other sites

Hi @WHMCS John,

On 3/19/2020 at 9:03 AM, WHMCS John said:

You could perhaps make a customisation to the checkout.tpl template to hide the GoCardless option from the Checkout page, so that a client would pay via an instant method upon signup, then follow the steps in #2 for renewals.

I would have thought that by "unticking" the box in Setup > Payment > Payment Gateways > Manage Existing Gateways > GoCardless > "Show on Order Form" would have had this exact effect.

However, "unticking" the box removes the gateway from both the order form and then also as a payment method on any invoices. Or am I mistaken? As I couldn't get it to work.

I really do not like modifying standard templates so have resorted to using a hook.

Now I am no coder (despite using WHMCS for over 10 years now......😣) so have modified the code provided by @bendrop and @brian! in this thread:

So here it is for anyone else. It seems to work for me but clearly I am not an expert so please test..........

<?php

function cart_remove_gocardless_gateway($vars)
{
    if ($vars['templatefile']=='viewcart'){

        // List of gateways to remove
        $disallowed = array('gocardless');

        $gateways = $vars['gateways'];
        
        foreach ($gateways as $k => $item) {
            if (in_array($item['sysname'],$disallowed)) {
                unset($gateways[$k]);
            }
        } 
        return array("gateways" => $gateways);
    }
}
add_hook("ClientAreaPageCart", 1, "cart_remove_gocardless_gateway");

 

 

Share this post


Link to post
Share on other sites
3 minutes ago, Vox said:

However, "unticking" the box removes the gateway from both the order form and then also as a payment method on any invoices. Or am I mistaken? As I couldn't get it to work.

it would remove them from both... the docs imply that it's just the order form, but i'm pretty sure it's always been both.

12 minutes ago, Vox said:

So here it is for anyone else. It seems to work for me but clearly I am not an expert so please test..........

it looks fine to me, but i'm probably biased. 🙂

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

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