Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

torqie's avatar

Cashier the same on laravel 5 as it is on laravel 4?

Just got done watching the videos on stripe. It was made for L4, would it all apply the same to L5, the L5 docs don't go over very much of the same stuff as the video did.

I followed the docs for L5, and I am getting InvalidArgumentException in StripeGateway.php line 99: No payment source provided.

Thanks for the help.

0 likes
3 replies
graham's avatar

Looking at the code I think No payment source indicated that the StripeId is missing

        if (! array_key_exists('source', $options) && $this->billable->hasStripeId()) {
…   
99              throw new InvalidArgumentException("No payment source provided.");
100         }

Have you registered the service provider - Laravel\Cashier\CashierServiceProvider in your app configuration file.

From 'services.php'

Have you set your Stripe key somewhere or set an environment variable for it env('STRIPE_API_SECRET')

'stripe' => [
    'model'  => 'User',
    'secret' => env('STRIPE_API_SECRET'),
],
torqie's avatar

I have included the Laravel\Cashier\CashierServiceProvider in my app config in the providers array. I also have set up my stripe key in the services.php config file.

I am wondering if I do not have my form setup right. should I be using data-number like mentioned in the video on this site, or from what I can see in the examples they put class="card-number stripe-sensitive" in their examples.

torqie's avatar
torqie
OP
Best Answer
Level 4

I figured it out. I was forgetting to set the hidden field with javascript

Please or to participate in this conversation.