inaxo / laravelstripehandler
Laravel package that contains everything you need to implement a stripe payment gateway
v1.0.0
2024-01-01 16:44 UTC
Requires
- ext-simplexml: *
README
- Run command:
composer require inaxo/laravelstripehandler
- And:
composer require stripe/stripe-php
- Add the following line to the autoload section in the
composer.json
file:
"Inaxo\\LaravelStripeHandler\\": "vendor/inaxo/laravelstripehandler/src/",
- Run the command:
composer dump-autoload
- Add the following line to the providers key array in the config/app.php file:
Inaxo\LaravelStripeHandler\LaravelStripeHandlerServiceProvider::class,
- Run the command again:
composer dump-autoload
- Now, to publish a package config file you need to run the following command:
php artisan vendor:publish --provider="Inaxo\LaravelStripeHandler\LaravelStripeHandlerServiceProvider"
- After publishing the service provider, you need to add this line to the
middleware
array in yourapp/Http/Kernel.php
:
\Illuminate\Session\Middleware\StartSession:: class,
- If you've completed all the previous steps, you need to enter data in
resources/LaravelStripeHandler/products.*
(XML by default). After that, you should add additional keys in your .env file:
STRIPE_PUBLIC_KEY=
STRIPE_SECRET_KEY=
STRIPE_HOME_ROUTE=
STRIPE_CURRENCY=
Enjoy!