Stripe Import Customers Error

Hi,

I am trying to reassociate a card on file in Stripe with an existing client who put it on file last week. We are running InvoiceNinja v5.5.89-C109 and the system details are below.

One of my clients had a payment method on file last week, it doesn’t show in the System Logs that they removed this payment method but it doesn’t show under Payment Methods in InvoiceNinja, while Stripe still shows it on file. To fix this I tried going to Settings => Payment Settings => Configure Gateways => Stripe and then Import Clients, which logged the error below in the laravel.log.

Import Clients probably isn’t the proper way to associate a payment method that was removed, as it checks all clients in InvoiceNinja. What is the proper way to do this for a single client?

Additionally, any ideas why Import Clients threw the error below? It worked last month, though it did switch some clients default payment methods to expired cards.

image

[2023-03-13 06:20:03] production.ERROR: Undefined constant App\Models\GatewayType::BACS {"exception":"[object] (Error(code: 0): Undefined constant App\\Models\\GatewayType::BACS at /var/www/invoiceninja-v5/app/Models/CompanyGateway.php:144)                                                              
[stacktrace]                                                       
#0 /var/www/invoiceninja-v5/app/Services/Invoice/AutoBillInvoice.php(98): App\\Models\\CompanyGateway->driver()                                                                                                   
#1 /var/www/invoiceninja-v5/app/Services/Invoice/InvoiceService.php(244): App\\Services\\Invoice\\AutoBillInvoice->run()                                                                                          
#2 /var/www/invoiceninja-v5/app/Jobs/Cron/AutoBill.php(61): App\\Services\\Invoice\\InvoiceService->autoBill()                                                                                                    
#3 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\\Jobs\\Cron\\AutoBill->handle()                                                                            
#4 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()                                                
#5 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()                                                                 
#6 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod()                                                          
#7 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Container/Container.php(661): Illuminate\\Container\\BoundMethod::call()                                                                      
#8 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(128): Illuminate\\Container\\Container->call()                                                                             
#9 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\\Bus\\Dispatcher->Illuminate\\Bus\\{closure}()                                                         
#10 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()                                                
#11 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(132): Illuminate\\Pipeline\\Pipeline->then()                                                                              
#12 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(124): Illuminate\\Bus\\Dispatcher->dispatchNow()                                                                 
#13 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\\Queue\\CallQueuedHandler->Illuminate\\Queue\\{closure}()                                             
#14 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()                                                
#15 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(126): Illuminate\\Pipeline\\Pipeline->then()                                                                     
#16 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(70): Illuminate\\Queue\\CallQueuedHandler->dispatchThroughMiddleware()                                           
#17 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(98): Illuminate\\Queue\\CallQueuedHandler->call()
#18 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(425): Illuminate\\Queue\\Jobs\\Job->fire()
#19 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(375): Illuminate\\Queue\\Worker->process()
#20 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(173): Illuminate\\Queue\\Worker->runJob()
#21 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(147): Illuminate\\Queue\\Worker->daemon()
#22 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(130): Illuminate\\Queue\\Console\\WorkCommand->runWorker()
#23 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Queue\\Console\\WorkCommand->handle()
#24 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#25 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#26 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod()
#27 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Container/Container.php(661): Illuminate\\Container\\BoundMethod::call()
#28 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Console/Command.php(183): Illuminate\\Container\\Container->call()
#29 /var/www/invoiceninja-v5/vendor/symfony/console/Command/Command.php(312): Illuminate\\Console\\Command->execute()
#30 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Console/Command.php(153): Symfony\\Component\\Console\\Command\\Command->run()
#31 /var/www/invoiceninja-v5/vendor/symfony/console/Application.php(1022): Illuminate\\Console\\Command->run()
#32 /var/www/invoiceninja-v5/vendor/symfony/console/Application.php(314): Symfony\\Component\\Console\\Application->doRunCommand()
#33 /var/www/invoiceninja-v5/vendor/symfony/console/Application.php(168): Symfony\\Component\\Console\\Application->doRun()
#34 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Console/Application.php(102): Symfony\\Component\\Console\\Application->run()
#35 /var/www/invoiceninja-v5/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(155): Illuminate\\Console\\Application->run()
#36 /var/www/invoiceninja-v5/artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle()
#37 {main}
"}

@dan0

It looks like your queue’s may not have restarted and they were running the old application in memory judging by that message.

If you run:

php artisan queue:restart

Can you test again and advise please.