Skip to content

Commit

Permalink
Config and route updates
Browse files Browse the repository at this point in the history
  • Loading branch information
alecritson committed Oct 3, 2023
1 parent 4c6d8fb commit 599baa9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
10 changes: 10 additions & 0 deletions payment/stripe/config/stripe.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
<?php

return [
/*
|--------------------------------------------------------------------------
| Webhook path
|--------------------------------------------------------------------------
|
| Set what the path should be for the webhook you set up in Stripe.
|
*/
'webhook_path' => 'stripe/webhook',

/*
|--------------------------------------------------------------------------
| Capture policy
Expand Down
6 changes: 4 additions & 2 deletions payment/stripe/routes/webhooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

0 comments on commit 599baa9

Please sign in to comment.