500 when addming Payment Method


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. ``


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()

Debian container running:


Thanks for reporting this!

cc @david @ben

can you try executing

php artisan view:clear


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.


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.

In my case, it is trying to access a non-existing view. I have tried the recommended steps except that i already am on a “fresh” install from yesterday: v5.3.35-C68

[previous exception] [object] (Error(code: 0): Call to a member function getConfigField() on null at myninja/storage/framework/views/d119336452f806ead635ed1daf48bc294fab6fd1.php:2)

However forcing the customer to add their banking details (i assume?) is not so userfriendly anyway – i only want to have an easy display of my banking details (and the invoice number) when using the subscription feature… in case a customer does not want to use a suggested payment provider. :thinking:
Maybe there is something i am not realizing yet tho. cc @hillel

Maybe you can configure a client portal message?

I couldn’t find any suitable option for what i wanted to archive, but it made me realize that a custom online-payment provider pretty much does the job, as there i can gather the needed information for invoice generation :+1: