Link Data from Gocardless

Hello all,

I am currently using another invoicing software and would like to switch to Invoice Ninja.

The problem is that my customers already have their data on gocardless and I can’t link them to the customer account on my Invoice Ninja installation.

Of course I don’t want my customers to create their data again when I switch…

Is there a way to link the data ?

Hi,

@david is there a solution for this?

There is some functionality in the application which is not exposed which may be able to help here.

Once you have configured invoice ninja and also configured your GoCardless payment gateway, you’ll want to gain console access and run the following console commands.

First you’ll want to find the primary id of your Gocardless Gateway in your database in the company_gateways table

image

Then from the command line at the root of the Invoice Ninja project run the following:

php artisan tinker

Follow by this

CompanyGateway::find(id_of_your_company_gateway_from_step_1)->driver()->importCustomers();

This will pull in all of your customers from GoCardless and their mandates for use in Invoice Ninja.

Hi David, thanks for the quick reply…
If I Run this command I geht the following error:

php artisan tinker CompanyGateway::find(1)->driver()->importCustomers();

-bash: Syntaxfehler beim unerwarteten Wort `(’

These are two separate commands, once you run php artisan tinker you’ll enter a PHP CLI environment where you can run the second command.

Thanks for your support, now it works :wink:

1 Like