Feat: Adding temp logging to for stripe webhook

This commit is contained in:
2026-09-29 14:30:52 +03:00
parent 9ce0c625ef
commit 1a7e8704d0
@@ -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());
}