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
I'd like to test my paddle webhooks locally while using the unmarshal function of the sdk.
It would be great to have a way to put that function into test mode, or providing some other way to test handling the event while in development.
What problem are you looking to solve?
In development I have the problem of not really having a way to sign my test requests so that I can use the unmarshal function.
Additional context
No response
How important is this suggestion to you?
Important
The text was updated successfully, but these errors were encountered:
My current solution was a python script with the body at body.json in the same folder (if anyone else needs this)
# send a POST request to localhost:3000/api/paddle imitating a paddle webhook notification# with the JSON body at body.jsonimportrequestsimportjsonimporttimeimporthmacimporthashliburl="http://localhost:3000/api/paddle"# construct the paddle signature header with timestamp and sha256-hmac body hash# unix timestamptimestamp=int(time.time())
# read the body from body.jsonwithopen("body.json", "r") asf:
body=f.read()
# construct the hmac signaturekey="YOUR_PADDLE_WEBHOOK_SECRET_KEY"payloadwithtimestamp=str(timestamp) +":"+bodysignature=hmac.new(key.encode(), payloadwithtimestamp.encode(), hashlib.sha256).hexdigest()
headers= {
"Content-Type": "application/json",
"paddle-signature": "ts="+str(timestamp) +";h1="+signature
}
# send the POST requestresponse=requests.post(url, headers=headers, data=body)
print(response.text)
Hi @motz0815,
Thank you for raising this feature request.
I can understand the problem you are facing. I am checking with our team on the best way of handling this. I will get back to you once i have a proper solution that will help improve the ways of working with our webhook during local development.
Tell us about your feature request
I'd like to test my paddle webhooks locally while using the unmarshal function of the sdk.
It would be great to have a way to put that function into test mode, or providing some other way to test handling the event while in development.
What problem are you looking to solve?
In development I have the problem of not really having a way to sign my test requests so that I can use the unmarshal function.
Additional context
No response
How important is this suggestion to you?
Important
The text was updated successfully, but these errors were encountered: