Skip to content

refactor: use WebhookService in payments router#16108

Merged
zomars merged 2 commits intomainfrom
refactor_use_webhookservice_in_payments_router
Aug 15, 2024
Merged

refactor: use WebhookService in payments router#16108
zomars merged 2 commits intomainfrom
refactor_use_webhookservice_in_payments_router

Conversation

@zomars
Copy link
Copy Markdown
Contributor

@zomars zomars commented Aug 6, 2024

What does this PR do?

Follow up to #15929

Refactored the payment webhooks integration to use WebhookService for sending payloads.

What changed?

  • Replaced direct sendPayload and getWebhooks calls with WebhookService.
  • Updated import statements to reflect these changes.
  • Simplified code for sending webhook payloads by utilizing WebhookService.

How to test?

  1. Trigger a booking payment event.
  2. Verify that the webhook payload is sent correctly using the new WebhookService.
  3. Check email notifications for No Show Fee Charged.

Why make this change?

This change aims to reduce code duplication and improve maintainability by using the WebhookService for handling webhook payload sending.


Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have added a Docs issue here if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

Checklist

  • I haven't read the contributing guide
  • My code doesn't follow the style guidelines of this project
  • I haven't commented my code, particularly in hard-to-understand areas
  • I haven't checked if my changes generate no new warnings

@vercel
Copy link
Copy Markdown

vercel Bot commented Aug 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ai ❌ Failed (Inspect) Aug 15, 2024 7:11pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Aug 15, 2024 7:11pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Aug 15, 2024 7:11pm

@zomars zomars marked this pull request as ready for review August 6, 2024 23:26
@graphite-app graphite-app Bot requested a review from a team August 6, 2024 23:26
@dosubot dosubot Bot added webhooks area: webhooks, callback, webhook payload 💻 refactor labels Aug 6, 2024
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Aug 6, 2024

Graphite Automations

"Add foundation team as reviewer" took an action on this PR • (08/06/24)

1 reviewer was added to this PR based on Keith Williams's automation.

@github-actions
Copy link
Copy Markdown
Contributor

E2E results are ready!

Copy link
Copy Markdown
Contributor

@joeauyeung joeauyeung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zomars zomars merged commit 5df14c3 into main Aug 15, 2024
Copy link
Copy Markdown
Contributor Author

zomars commented Aug 15, 2024

Merge activity

@zomars zomars deleted the refactor_use_webhookservice_in_payments_router branch August 15, 2024 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core area: core, team members only foundation ready-for-e2e 💻 refactor webhooks area: webhooks, callback, webhook payload

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants