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

Update webhook event codes #405

Merged
merged 3 commits into from
Jan 30, 2025

Conversation

jorgeribeiro
Copy link
Contributor

Summary

I recently updated my Adyen integration to handle OFFER_CLOSED webhook events and I noticed that this constant did not exist in the library, so I am adding it along with other event codes that are also missing based on the webhooks listed in the docs.
Here's the full list of the event codes added:

  • ACH_NOTIFICATION_OF_CHANGE
  • AUTORESCUE
  • AUTORESCUE_NEXT_ATTEMPT
  • CANCEL_AUTORESCUE
  • EXPIRE
  • MANUAL_REVIEW_ACCEPT
  • MANUAL_REVIEW_REJECT
  • OFFER_CLOSED
  • POSTPONED_REFUND
  • RECURRING_CONTRACT
  • TECHNICAL_CANCEL

@jorgeribeiro jorgeribeiro requested a review from a team as a code owner January 16, 2025 13:18
@DjoykeAbyah
Copy link
Member

Hi @jorgeribeiro,

Thank you for your contribution! Our team is currently reviewing the changes, and we’ll get back to you as soon as possible.

Kind regards,

Djoyke
Adyen

Copy link
Contributor

@gcatanese gcatanese left a comment

Choose a reason for hiding this comment

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

Thank you @jorgeribeiro for spotting the missing events and for your contribution!

It would be really nice if you could also add 1 or 2 unit tests that verify new event code are correctly deserialised, for example AUTORESCUE.

See an example of unit test in webhook_handler_test.go

src/webhook/webhook_handler.go Show resolved Hide resolved
src/webhook/webhook_handler.go Show resolved Hide resolved
Copy link
Contributor

@gcatanese gcatanese left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! 🎊

@gcatanese gcatanese merged commit 0542c65 into Adyen:main Jan 30, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants