diff --git a/UI_V2/flask_server.py b/UI_V2/flask_server.py index cacc17e..74bae65 100644 --- a/UI_V2/flask_server.py +++ b/UI_V2/flask_server.py @@ -54,6 +54,11 @@ def healthz(): def ipn(): # 1. Get the signature from the 'Verification-Token' header token = request.headers.get('Verification-Token') + + if token: + # This ignores the signature completely just so we can see what's inside + raw_data = jwt.decode(token, options={"verify_signature": False}) + app.logger.info(f"UNVERIFIED JWT CONTENT: {raw_data}") # 2. If it exists, inject it into the location the SDK expects if token: diff --git a/UI_V2/helpers/netopia.py b/UI_V2/helpers/netopia.py index b45483d..557f210 100644 --- a/UI_V2/helpers/netopia.py +++ b/UI_V2/helpers/netopia.py @@ -54,7 +54,7 @@ Notes: • Always trust order status updates coming from IPN, not only the browser redirect. """ from __future__ import annotations - +import time import os from datetime import datetime, timezone from dataclasses import dataclass @@ -159,6 +159,8 @@ def _build_payment_service(settings: Optional[NetopiaSettings] = None) -> Paymen print('public_key_str= ', raw_key) #private_key_str=settings.private_key_str print('pos_signature_set= ',settings.pos_signature_set) + print(f"DEBUG: System Time: {int(time.time())}") + client = PaymentClient(config) return PaymentService(client)