500 when addming Payment Method

Hi,

When adding the payment method in the invoice ninja billing portal, we get

She gets the 500 | Server error.

On debug mode is active, we get see:


For better readability, in text format

in /var/www/ninja/storage/framework/views/07a752448d331c4e99b19cc64552cec815c34aea.php (line 3)

  1. <?php $__env->startSection('gateway_head'); ?>
  2. <meta name="stripe-publishable-key" content="<?php echo e($gateway->getPublishableKey()); ?>">
  3. <meta name="stripe-account-id" content="<?php echo e($gateway->company_gateway->getConfigField('account_id')); ?>">
  4. <meta name="stripe-secret" content="<?php echo e($intent->client_secret); ?>">
  5. <meta name="only-authorization" content="true">
  6. <meta name="stripe-token" content="">
  7. <?php $__env->stopSection(); ?>
  8. ``

And

Illuminate\View\ViewException:
Call to a member function getConfigField() on null (View: /var/www/ninja/resources/views/portal/ninja2020/gateways/stripe/credit_card/authorize.blade.php)

at /var/www/ninja/storage/framework/views/07a752448d331c4e99b19cc64552cec815c34aea.php:3
at Illuminate\View\Engines\CompilerEngine->handleViewException()
(/var/www/ninja/vendor/livewire/livewire/src/ComponentConcerns/RendersLivewireComponents.php:73)

Debian container running:
image

Hi,

Thanks for reporting this!

cc @david @ben

can you try executing

php artisan view:clear

@Danilo

I have a fix for this in the next release.

Hi David,

No change with php artisan view:clear

I am currently using 5.1.53-C47.

Do you think will help to update to an already released version?

Thank you.

Hi,

This is what happened…

I have downloaded the v5-stable files from the Github and replace the ones I had.
I only kept .env and config/*

Then PHP artesian optimize and the problem is gone.

Now, the only thing not working that I am aware of is the history of recurring invoices, but that is a topic for another thread.

Thank you.