Feat: Adding temp logging to for stripe webhook
This commit is contained in:
@@ -33,6 +33,17 @@ class StripeWebhookMiddleware
|
|||||||
$secret
|
$secret
|
||||||
);
|
);
|
||||||
} catch (UnexpectedValueException|SignatureVerificationException $e) {
|
} 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());
|
abort(400, $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user