-
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Abort if webhook event was alreay processed * Make it possible to use a custom profile class You might want to perform some more logic to determine if the webhook event should be processed or not. * No need for whereJsonContains -> just use where * Add test * Update documentation * Fix test
- Loading branch information
Showing
5 changed files
with
71 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace Spatie\StripeWebhooks; | ||
|
||
use Illuminate\Http\Request; | ||
use Spatie\WebhookClient\Models\WebhookCall; | ||
use Spatie\WebhookClient\WebhookProfile\WebhookProfile; | ||
|
||
class StripeWebhookProfile implements WebhookProfile | ||
{ | ||
public function shouldProcess(Request $request): bool | ||
{ | ||
return ! WebhookCall::where('payload->id', $request->get('id'))->exists(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters