cartalyst / stripe-laravel

Cartalyst Stripe package integration for Laravel.
BSD 3-Clause "New" or "Revised" License
335 stars 57 forks source link

Class 'Cartalyst\Stripe\Laravel\StripeServiceProvider' not found #33

Closed howakx closed 6 years ago

howakx commented 6 years ago

I'm getting following error on Laravel 5.5. I have tried to reinstall both laravel and cartalyst but no luck.

brunogaspar commented 6 years ago

If the class is not being found, there are a couple of reasons:

  1. Package is not installed or you tried to install but i failed
  2. Autoload failed to complete due to other error
  3. You maybe installed the incorrect package?

Run the following composer show -i "cartalyst/*" on your terminal and paste what it returns please.

I've done a fresh install of Laravel 5.5 and installed Cartalyst Stripe Laravel successfully, so i'm assuming it's something incorrect on your end.

howakx commented 6 years ago

Thank you for quick response. Below is the output that i got after running mentioned comand:

cartalyst/collections v1.1.0 Collection Abstaction library for PHP. cartalyst/stripe v2.1.0 A comprehensive Stripe API package. cartalyst/stripe-laravel v7.0.0 Laravel 5.5 integration for the Cartalyst Stripe package.

brunogaspar commented 6 years ago

When and where exactly does that error show up? I'm failing to reproduce it.

howakx commented 6 years ago

When i try to add providers in config/app.php

brunogaspar commented 6 years ago

Starting from Laravel 5.5 that's not required since it's "added" automatically (if the package itself is setup to do that), but we left that step on the documentation as i still prefer to specify it on projects, but either way, i'm not being able to reproduce your issue.

This is what i've ran to do a fresh install of Laravel 5.5, Cartalyst Stripe Laravel and to run a very quick test

composer create-project laravel/laravel stripe-laravel && cd stripe-laravel && composer require cartalyst/stripe-laravel

Once everything is installed i tested with Tinker

➜  stripe-laravel php artisan tinker
Psy Shell v0.8.15 (PHP 7.1.8 — cli) by Justin Hileman
>>> Cartalyst\Stripe\Laravel\Facades\Stripe::make()
RuntimeException with message 'The Stripe API key is not defined!'
>>>

Which tells me that everything is working as expected. So i can only assume it's something on your environment and not being able to reproduce it limits on what i can try to reproduce it and help you figure it out.

howakx commented 6 years ago

Resolved.. Thanks 👍

cbj4074 commented 6 years ago

@howakx Would you be so kind as to share with us the solution in your case?

howakx commented 6 years ago

Actually the package was not getting installed properly. So, I have tested on different environment and it was working there perfectly.