Define request body when there is no signing secret defined

Closes #14447
This commit is contained in:
Cédric Krier
2025-12-23 12:09:31 +01:00
parent 6b9135321c
commit 34cb1a4b35
+1 -1
View File
@@ -88,9 +88,9 @@ def webhooks_endpoint(request, pool, account):
('webhook_identifier', '=', account),
])
request_body = request.get_data(as_text=True)
if account.webhook_signing_secret:
sig_header = request.headers['STRIPE_SIGNATURE']
request_body = request.get_data(as_text=True)
try:
stripe.Webhook.construct_event(
request_body, sig_header, account.webhook_signing_secret)