Level 9
Simple fix:
use Stripe\Stripe;
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm using Laravel 5.2.
The class is in the files with the namespace of stripe, I'm just confused as to why it can't find the Stripe class.
composer.json
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"illuminate/html": "^5.0",
"stripe/stripe-php": "3.9.0"
}
StripeBilling.php is pretty much the exact same as the Laracast series on stripe:
https://github.com/laracasts/Billing-With-Stripe/blob/master/app/Acme/Billing/StripeBilling.php
Thanks for any help I get.
Simple fix:
use Stripe\Stripe;
Please or to participate in this conversation.