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

light's avatar

Laravel cart with paypal & stripe support

Hello all,

I'm creating e-commerce site in laravel 5.2. I will require a cart functionality with payment integration [stripe & paypal]. Is there any package or library that you recommend?

0 likes
9 replies
light's avatar

@Reached : Adding 'Gloudemans\Shoppingcart\ShoppingcartServiceProvider' in providers, I'm getting error "Class 'App\Http\Controllers\ShoppingcartServiceProvider' not found"

light's avatar

Thanks @bix I'll check that out for payment gateway too

Reached's avatar

If you are using Laravel 5.* im pretty sure you have to do this when adding to your providers array:

Gloudemans\Shoppingcart\ShoppingcartServiceProvider::class,

Notice the missing '' here.

light's avatar

Tried that way too still getting : Class 'App\Http\Controllers\Cart' not found when I write following line in my controller

Cart::add('293ad', 'Product 1', 1, 9.99, array('size' => 'large'));

Reached's avatar

You have to add the class at the top of your Controller like so:

use Cart;
1 like
bix's avatar

You have to import the Cart facade at the beginning of your Controller like so

use Cart;
1 like

Please or to participate in this conversation.