Jump to content
aquiss

GoCardless Module Directory Filename and Migration

Recommended Posts

Just been thinking about the directory name for the gocardless module name that WHMCS will be using.

There is a 2-3 commercial modules that provide GoCardless support, in all cases they use the directoryname of "gocardless", which of course will cause a conflict with files. This is because most of them are based on the old GoCardless module from WHMCS v5 days and thus the naming structure as never changed.

Is the WHMCS core module going to be using the same directory name? If so, I would recommend the new core module to use say "whmcsgocardless" so that anyone using a commercial module can at least have the two running alongside each other and thus allow for a migration of payment gateways to take place.

Share this post


Link to post
Share on other sites

Hi @aquiss,

Thanks for your taking the time to raise this interesting point.

Applying the 7.7 update to an installation using a legacy or after-market module called "gocardless" would result in the files being overwritten. An installation using the old legacy module (if it still even works!) would be upgraded and need to re-configure the payment gateway to use the new implementation. Modules developed by us are canonical.

It should be possible to restore your custom gocardless.php module file to continue using it after performing the update. However longer term you should look to rename your custom or 3rd party module so it does not share the same name as the official one we ship.

When we introduced an official Stripe js module, we included a migration path from after-market modules due to high usage. GoCardless is not in the same boat, so don't intend to do the same.

I'll raise this with the documentation team so we can look at potentially adding a note to the documentation about legacy or after-market modules.

 

Share this post


Link to post
Share on other sites

@WHMCS John

Thanks for the reply

Do you know what fields your module uses for your new module to work? I'm purely thinking if dropping your new module in will just be a plug/play type situation (because I would prefer to work our business towards using an included core module).

The current commercial one we have been using for years (and still working to this day) uses the following tables/fields to obtain it's data.

tblclients -> gatewayid (we populate that with the word gocardless).
mod_gocardless_preauth (which includes the userid (id from tblclients) and subscriptionid (GoCardless mandate reference).

 

As I say there is few of us (and I've chatted to a few here over private messages) who having been using gocardless and whmcs together for years. Many are using modules based on a patched version that was on GitHub that you guys used to distribute with WHMCS v5 and was made to work with newer versions on WHMCS. Whilst I understand this is no Stripe situation, I guess i'm speaking up in advance and getting it out there for possible conflicts with this new module.

Share this post


Link to post
Share on other sites

Hi @aquiss,

In our implementation the Mandate ID is stored in the tblclients.gatewayid field. Then the payment method of the invoice of gocardless is all that's needed.

So it sounds like if you were to migrate the mod_gocardless_preauth.subscriptionid value into the tblclients.gatewayid field, it might do the trick.

The configuration of the webhook and oauth secrets is automated in our module, so it wouldn't be possible to use an existing webhook from a previous integration. So I'd suggest trying the following migration:

  1. Migrate the mod_gocardless_preauth.subscriptionid values into the tblclients.gatewayid field
  2. Activate an unused payment gateway temporarily (could be anything, preferably one you've never used before)
  3. Disable the GoCardless module
  4. Choose to migrate clients to the temporary gateway from step 2
  5. Activate the new GoCardless module and complete the auto-setup routine
  6. Disable the temporary gateway from step 2
  7. Choose to migrate clients to GoCardless.

In theory this should do the trick.

I would be valuable to have your feedback on how the migration went, so please do try the 7.7 before release and share your experience here.

If you need a development licence to test with, please let me know and I can issue one to your account.

 

 

Share this post


Link to post
Share on other sites
Posted (edited)

John

We have customised / redeveloped the old legacy gocardless module so it worked on whmcs 7 and also set it so only one DD mandate works for all invoice, our module now also checks every hour for transaction fees (which apply when money is received by gocardless) it turn updates whmcs invoice with the transaction fee. 

 

Does 7.7 native version set a spend limit in gocardless? 

If so can this be removed or configured by admin?

 

does it allow one gocardless agreement for all of the clients invoices to charge to GC? 

 

I think we should be able to change to the 7.7 navite module, if I give you my code could you add transaction fee support to whmcs native version? 

Edited by cyberhostpro

Share this post


Link to post
Share on other sites

Hi @cyberhostpro,

Thanks for helping with 7.7 pre-release testing.

Our code doesn't make a reference to a spend limit variable, so we are not explicitly setting a variable.

I also checked the GoCardless developer reference, and couldn't locate mention of it there either, so not sure it can be set by remote systems. Is there a particular setting you're interested in?

 

One mandate for a client would be used to charge as many of their invoices as you like - based upon the payment method of the service and invoice.

 

 

Share this post


Link to post
Share on other sites

John

 

can this be added?? We’ve coded it already so happy to donate to you all of my code for you to take anything out of it to add to yours. 

  • Like 1

Share this post


Link to post
Share on other sites

Hi @cyberhostpro,

If there's a way we can make improvements to the module, that is something we'd be interested in. I'll message you directly for more info.

  • Like 1

Share this post


Link to post
Share on other sites

I would greatly like to see Transaction Fees included to this module.

Share this post


Link to post
Share on other sites

We developed this a few months ago. I’ve passed all of my code to WHMCS so hopefully they’ll include it in 7.7 or a future release 

  • Like 1

Share this post


Link to post
Share on other sites

I produced the original patch that introduced the mod_gocardless_preauth table and also included some hooks to automate the payment collection ahead of the due date and supress invoice messages for payments underway.

Reading through the thread I am concerned that support in 7.7 utilises the ' gatewayid' value in tblClients. By doing this you only allow a single payment method for a user's account. Frequently we find clients will pay the first invoice with a credit/debit card then switch to Direct Debit. This happens when they purchase additional new services so they are activated immediately. Using our implementation with the mod_gocardless_preauth table we can dual run a Credit/Debit Card and Direct Debit per account.

I appreciate I am late to contribute to the thread but can you seriously reconsider using 'mod_gocardless_preauth' to store the preauth value from Gocardless? Even if you change the structure, at least persist it in a field other than 'gatewayid'.

Share this post


Link to post
Share on other sites

Hi @yorkukhosting,

Thanks for joining in the pre-release discussion.

At present WHMCS supports a total of one stored set of payment details per client. However we are planning to introduce support for multiple credit cards (and potentially other tokens) later this year: https://requests.whmcs.com/topic/multiple-credit-card-support_1

 

Share this post


Link to post
Share on other sites

@yorkukhosting

We use your module. Do you think you can release a version of your module, with a different folder name, so that it does not conflict with the one WHMCS are going to release? As confirmed earlier in this thread, anyone upgrading to 7.7 will find your files will be overridden.

I can see fallout from all this if we are not careful.

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