You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from paddle_billing.Notifications import Secret, Verifier
integrity_check = Verifier().verify(request, Secret('WEBHOOK_SECRET_KEY'))
---> what is this mysterious "request" object? Is it from fastapi or any other library or is it defined in the library itself? At least flask "request" object did not work.
(it is not a bug but the issue categories were very limited)
The Verifier().verify() method currently supports any request object matching the paddle_billing.Notifications.Requests.Request protocol, which covers major libraries such as Flask and Django.
I've checked that Flask v3.1.0 requests can be verified, so the issue could be related to the time drift check. By default the max variance is 5 seconds, so you could try increasing this to rule it out as the cause, e.g. Verifier(seconds).verify(request, Secret('WEBHOOK_SECRET_KEY'))
In future we may introduce dedicated convenience methods to make this easier to use, but in the meantime, if you continue to experience this issue, please let us know.
Describe the bug
---> what is this mysterious "request" object? Is it from fastapi or any other library or is it defined in the library itself? At least flask "request" object did not work.
(it is not a bug but the issue categories were very limited)
Steps to reproduce
from flask import request
...
@app.route('/test', methods=['POST']:
def test():
integrity_check = Verifier().verify(request, Secret('WEBHOOK_SECRET_KEY'))
Expected behavior
verify the request
Code snippets
No response
Python version
Python 3.12
SDK version
paddle-python-sdk 1.01
API version
Paddle Version 1
Additional context
No response
The text was updated successfully, but these errors were encountered: