Jump to content

New Gocardless module


twikamltd

Recommended Posts

This module is designed for the new style Gocardless accounts/API only, where you create read/write tokens and configure multiple webhooks.

 

There's no test mode as DD's aren't instant so might as well test with live details.

 

It uses the new API, so if you've had your GC account upgraded, then you'll need to create new tokens and webhooks.

 

It can handle multiple events per callback as per the API spec.

 

Was initially based on a public module, but doesn't bear much resemblance to it anymore, and doesn't use any Gocardless provided PHP libraries. Comes with a dedicated page in the client area to create/view/cancel direct debits.

 

Download

 

Enjoy, any feedback/fixes appreciated.

Link to comment
Share on other sites

  • 1 month later...
  • Replies 56
  • Created
  • Last Reply

Top Posters In This Topic

  • 4 weeks later...
  • 2 weeks later...
  • 3 weeks later...

Hi,

We have tried to install this but getting the error below

 

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dbnname.mod_gocardless_preauth' doesn't exist' in /home/x/public_html/vendor/illuminate/database/Connection.php:333 Stack trace: #0 /home/x/public_html/vendor/illuminate/database/Connection.php(333): PDO->prepare('select `subscri...') #1 /home/x/public_html/vendor/illuminate/database/Connection.php(706): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'select `subscri...', Array) #2 /home/x/public_html/vendor/illuminate/database/Connection.php(669): Illuminate\Database\Connection->runQueryCallback('select `subscri...', Array, Object(Closure)) #3 /home/x/public_html/vendor/illuminate/database/Connection.php(342): Illuminate\Database\Connection->run('select `subscri...', Array, Object(Closure)) #4 /home/x/public_html/vendor/illuminate/database/Query/Builder.php(1583): Illuminate\Database\Connection->select('select `subscri in /home/x/public_html/vendor/whmcs/whmcs-foundation/lib/Terminus.php on line 0

Link to comment
Share on other sites

Hi,

We have tried to install this but getting the error below

 

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dbnname.mod_gocardless_preauth' doesn't exist' in /home/x/public_html/vendor/illuminate/database/Connection.php:333 Stack trace: #0 /home/x/public_html/vendor/illuminate/database/Connection.php(333): PDO->prepare('select `subscri...') #1 /home/x/public_html/vendor/illuminate/database/Connection.php(706): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'select `subscri...', Array) #2 /home/x/public_html/vendor/illuminate/database/Connection.php(669): Illuminate\Database\Connection->runQueryCallback('select `subscri...', Array, Object(Closure)) #3 /home/x/public_html/vendor/illuminate/database/Connection.php(342): Illuminate\Database\Connection->run('select `subscri...', Array, Object(Closure)) #4 /home/x/public_html/vendor/illuminate/database/Query/Builder.php(1583): Illuminate\Database\Connection->select('select `subscri in /home/x/public_html/vendor/whmcs/whmcs-foundation/lib/Terminus.php on line 0

 

It is ok - I solved it by creating the table mod_gocardless_preaut manually.

Link to comment
Share on other sites

It cancels it immediately at Gocardless, but it's the Gocardless webhook which tells WHMCS to delete it from the database, not the action of clicking the button.

 

thanks- the webhook in gogardelss is showing a 400 bad request?

 

Below is the request and response:

User-Agentgocardless-webhook-service/1.1

Content-Typeapplication/json

Webhook-Signature0ac632ee73fbb0d54b3a996341519cac961f27e180224e13f30ea76e5701800a

Body

{

"events": [

{

"id": "EV0038K9JH5CM0",

"created_at": "2017-02-03T16:01:44.892Z",

"resource_type": "mandates",

"action": "submitted",

"links": {

"mandate": "MD0003ZEA8BR6T"

},

"details": {

"origin": "gocardless",

"cause": "mandate_submitted",

"description": "The mandate has been submitted to the banks."

},

"metadata": {}

 

Resonse:

 

dateFri, 03 Feb 2017 16:37:49 GMT

pragmano-cache

serverApache

expiresThu, 19 Nov 1981 08:52:00 GMT

connectionclose

set-cookieWHMCSSJwMo4T3Yydq=361ndthcmrt08m68sejupuhfq6; path=/; secure; HttpOnly

content-typetext/html; charset=utf-8

cache-controlno-store, no-cache, must-revalidate, post-check=0, pre-check=0

content-length26

Body

77: Unknown mandate action

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...

Hi we've been using the old original version of the GoCardless module (although we may have upgraded to one of the forks along the way at some stage to fix some errors) but it's worked great. UNTIL! moving from PHP5.6 to PHP7 and mysql 5.7 on a new server.

 

Now when we create an invoice and a client logs in and pays it - WHMCS doesn't mark it as paid. The payment is there in GoCardless dashboard though... Can anyone help suggest how to fix this - or does anyone know how to migrate our current GoCardless module over to this newer Github version by YHUK?

 

Thanks for any help :)

Link to comment
Share on other sites

Hi we've been using the old original version of the GoCardless module (although we may have upgraded to one of the forks along the way at some stage to fix some errors) but it's worked great. UNTIL! moving from PHP5.6 to PHP7 and mysql 5.7 on a new server.

 

Now when we create an invoice and a client logs in and pays it - WHMCS doesn't mark it as paid. The payment is there in GoCardless dashboard though... Can anyone help suggest how to fix this - or does anyone know how to migrate our current GoCardless module over to this newer Github version by YHUK?

 

Thanks for any help :)

 

ok further to this I've removed the older module and installed the new module. However I can't seem to get it working with the sandbox credentials entered. On the payment screen for a new test email it says a direct debit is already in place which is great, so they I click Pay and it says it is successful and will show as paid once cleared.

 

But then when logging into the sandbox there are no payments there showing...

 

Thanks again for any help with this.

Link to comment
Share on other sites

Hi we've been using the old original version of the GoCardless module (although we may have upgraded to one of the forks along the way at some stage to fix some errors) but it's worked great. UNTIL! moving from PHP5.6 to PHP7 and mysql 5.7 on a new server.

 

Now when we create an invoice and a client logs in and pays it - WHMCS doesn't mark it as paid. The payment is there in GoCardless dashboard though... Can anyone help suggest how to fix this - or does anyone know how to migrate our current GoCardless module over to this newer Github version by YHUK?

 

Thanks for any help :)

 

Hi further to this I've now given up on the old module with php7 and deleted it and installed this new version which looks great. I've set up a sandbox for the new api and put the details in the module settings.

 

However when I make a payment on a test invoice the module gives the confirmation:

Your direct debit has been charged, this invoice status will update when the payment has cleared.

 

But then when I log back into the sandbox no payments are there? If anyone could please help me to fix this...

Link to comment
Share on other sites

  • 2 weeks later...

Hi thanks for the reply. We've since now moved on to the new GoCardless API instead and done some work to update the newer module originally posted at the top of this thread so it works with php7 and some of our old subscriptions etc.

 

So we've ended up with a further updated new and improved module, PM me if anybody needs any revised code.

Link to comment
Share on other sites

Hi soydemadrid,

 

Would you be able provide a link to your updated code please? For some reason my profile won't let me PM.

 

We are currently using the https://github.com/impelling/gocardless-whmcs version of the module which is a fork of the original.

 

The database schema of this new module looks a little different.

 

Did you have to change much to get your existing authorisations working with the new module?

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