From 1a7e8704d031fd7f5260bc1790b8ae83f0c370c1 Mon Sep 17 00:00:00 2001 From: Konstantinos Arvanitakis Date: Tue, 29 Sep 2026 14:30:52 +0300 Subject: [PATCH] Feat: Adding temp logging to for stripe webhook --- .../Http/Middleware/StripeWebhookMiddleware.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Payment/Http/Middleware/StripeWebhookMiddleware.php b/src/Payment/Http/Middleware/StripeWebhookMiddleware.php index 6a1fd4c..2a2e72b 100644 --- a/src/Payment/Http/Middleware/StripeWebhookMiddleware.php +++ b/src/Payment/Http/Middleware/StripeWebhookMiddleware.php @@ -33,6 +33,17 @@ class StripeWebhookMiddleware $secret ); } catch (UnexpectedValueException|SignatureVerificationException $e) { + \Illuminate\Support\Facades\Log::error('Stripe webhook signature verification failed', [ + 'signature_header' => $stripeSig, + 'secret_prefix' => substr((string) $secret, 0, 12), + 'secret_length' => strlen((string) $secret), + 'body_length' => strlen($request->getContent()), + 'body_sha256' => hash('sha256', $request->getContent()), + 'body_raw' => $request->getContent(), + 'content_type' => $request->header('Content-Type'), + 'content_encoding' => $request->header('Content-Encoding'), + ]); + abort(400, $e->getMessage()); }