Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update webhook example to use async/await #92

Merged
merged 1 commit into from
Dec 19, 2024
Merged

Conversation

danbillson
Copy link
Contributor

Updates the webhook example to use async/await since paddle.webhooks.unmarshal returns a promise the previous example wouldn't work, the other possible option instead of async/await is to use:

paddle.webhooks.unmarshal(rawRequestBody, secretKey, signature).then((eventData) => {
    switch (eventData.eventType) { ...

@danbillson danbillson self-assigned this Dec 19, 2024
@danbillson danbillson requested a review from a team as a code owner December 19, 2024 09:24
@danbillson danbillson merged commit 05abadc into main Dec 19, 2024
7 checks passed
@danbillson danbillson deleted the webhooks-example branch December 19, 2024 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants