Skip to content

Commit

Permalink
Check for SQUARE_WEBHOOK_URL in webhook view
Browse files Browse the repository at this point in the history
otherwise use the request builder
  • Loading branch information
staticfox committed Feb 22, 2025
1 parent 85bdd3f commit 46b2caa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion registration/views/webhooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
@csrf_exempt
def square_webhook(request):
square_signature = request.headers.get("X-Square-HMACSHA256-Signature")
notification_url = request.build_absolute_uri()
notification_url = getattr(settings, "SQUARE_WEBHOOK_URL", request.build_absolute_uri())

signature_valid = is_valid_webhook_event_signature(
request.body.decode("utf-8"),
Expand Down

0 comments on commit 46b2caa

Please sign in to comment.