diff --git a/payment/stripe/config/stripe.php b/payment/stripe/config/stripe.php index ed63ec6..e42b7b6 100644 --- a/payment/stripe/config/stripe.php +++ b/payment/stripe/config/stripe.php @@ -1,6 +1,16 @@ 'stripe/webhook', + /* |-------------------------------------------------------------------------- | Capture policy diff --git a/payment/stripe/routes/webhooks.php b/payment/stripe/routes/webhooks.php index bf485e2..b58c1cb 100644 --- a/payment/stripe/routes/webhooks.php +++ b/payment/stripe/routes/webhooks.php @@ -2,5 +2,7 @@ use Illuminate\Support\Facades\Route; -Route::post('stripe/webhook', \Lunar\Stripe\Http\Controllers\WebhookController::class) - ->withoutMiddleware([\App\Http\Middleware\VerifyCsrfToken::class]); +Route::post(config('lunar.stripe.webhook_path', 'stripe/webhook'), \Lunar\Stripe\Http\Controllers\WebhookController::class) + ->withoutMiddleware([\App\Http\Middleware\VerifyCsrfToken::class]) + ->middleware(\Lunar\Stripe\Http\Middleware\StripeWebhookMiddleware::class) + ->name('lunar.stripe.webhook');