$ composer require laravel-shield/stripe
After installing add the following configuration to your config/shield.php
file:
'services' => [
'stripe' => [
'driver' => \Shield\Stripe\Stripe::class,
'options' => [
'secret' => 'your-webhook-token',
'tolerance' => 300 // in seconds, you can remove this line to use stripes default.
]
]
]
You can now add the middleware to your routes like so:
Route::middleware('shield:stripe')->post('/hooks/stripe', '[email protected]');