kamrul-haque / laravel-stripe-payment
Add Stripe payment functionality with partial refund feature to your existing Laravel project. The package uses the latest stripe.js v3 and fully customizable to your need.
Installs: 118
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Language:Blade
pkg:composer/kamrul-haque/laravel-stripe-payment
Requires
- laravel/framework: ^7.0|^8.0|^9.0|^10.0
- stripe/stripe-php: ^9.9
README
Add Stripe payment functionality with partial refund feature to your existing Laravel project. The package uses the latest stripe.js v3 and fully customizable to your need.
Installation
Install the package via composer:
composer require kamrul-haque/laravel-stripe-payment
Publish resources of the package:
php artisan vendor:publish --tag="laravel-stripe"
Migrate the necessary database tables:
php artisan migrate
Configuration
Set the Stripe Api Keys in .env:
// .env
STRIPE_PUBLIC_KEY=
STRIPE_SECRET_KEY=
Add routes to web.php:
// routes/web.php
<?php
use App\Http\Controllers as Controllers;
use Illuminate\Support\Facades\Route;
Route::group(['middleware' => 'auth'], function () {
require __DIR__.'/stripe.php';
});
Usage
- Access the checkout page by
stripe-payments/createuri added to your application by the package - Access the payments completed and partial refund functionality by
stripe-paymentsuri added to your application by the package