add more logs
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from __future__ import annotations
|
||||
import jwt
|
||||
|
||||
import os
|
||||
import logging
|
||||
@@ -41,6 +42,13 @@ def ipn():
|
||||
try:
|
||||
# Pass the whole request object, not just request.data
|
||||
data = verify_ipn(request)
|
||||
|
||||
sig_header = request.headers.get('X-Netopia-Signature')
|
||||
if sig_header:
|
||||
# This doesn't verify, it just PEERS inside the message to see the POS Signature
|
||||
unverified_payload = jwt.decode(sig_header, options={"verify_signature": False})
|
||||
app.logger.info(f"JWT PAYLOAD POS: {unverified_payload.get('posSignature')}")
|
||||
|
||||
app.logger.info("IPN OK: %s", data)
|
||||
return jsonify({"errorCode": 0}), 200
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user