stupid typo
This commit is contained in:
1 parent
4320b4cba9
commit
57a5afbe48
2 files changed
+12
-9
No files matched your search
+6
-6
@@ -23,7 +23,7 @@ time = int(time())
|
||||
import asquare as sq
|
||||
|
||||
# Square SDK webhook validation
|
||||
from square.utilities.webhooks_helper import is_valid_webhook_event_signature
|
||||
from square.utils.webhooks_helper import verify_signature
|
||||
|
||||
# from asquareclass import AsyncSquareClient # type: ignore
|
||||
from abricksetapi import AsyncBricksetAPI
|
||||
@@ -121,11 +121,11 @@ async def hook_handler(request: web.Request) -> web.Response:
|
||||
return web.Response(status=401, text="Unauthorized: Missing signature")
|
||||
|
||||
# Use Square SDK's official validation function
|
||||
is_valid = is_valid_webhook_event_signature(
|
||||
body_str,
|
||||
signature_header,
|
||||
SQUARE_WEBHOOK_SIGNATURE_KEY,
|
||||
SQUARE_WEBHOOK_URL,
|
||||
is_valid = verify_signature(
|
||||
request_body=body_str,
|
||||
signature_header=signature_header,
|
||||
signature_key=SQUARE_WEBHOOK_SIGNATURE_KEY,
|
||||
notification_url=SQUARE_WEBHOOK_URL,
|
||||
)
|
||||
|
||||
if not is_valid:
|
||||
|
||||
Reference in new issue
Block a user