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

feat(refunds): Trigger refund outgoing webhooks in create and retrieve refund flows #6635

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

srujanchikke
Copy link
Contributor

@srujanchikke srujanchikke commented Nov 21, 2024

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Trigger refund outgoing webhooks in create and retrieve refund flows.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Test cases :

  1. Create a refund without configuring incoming webhooks, this should trigger outgoing webhook to merchant
  2. If possible create a refund with processing and update the status by force sync, Upon status update it should trigger outgoing webhook to merchant.
    Refund created with webhooks configured with immediate status = 'success'
Screenshot 2024-11-22 at 5 56 59 PM

outgoing webhook triggered for the same event.
Screenshot 2024-11-22 at 5 57 52 PM

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@srujanchikke srujanchikke added A-core Area: Core flows A-refunds Area: Refund flows labels Nov 21, 2024
@srujanchikke srujanchikke self-assigned this Nov 21, 2024
@srujanchikke srujanchikke requested review from a team as code owners November 21, 2024 20:13
Copy link

semanticdiff-com bot commented Nov 21, 2024

Review changes with  SemanticDiff

Changed Files
File Status
  crates/router/src/utils.rs  7% smaller
  crates/router/src/core/refunds.rs  0% smaller

jarnura
jarnura previously approved these changes Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-core Area: Core flows A-refunds Area: Refund flows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants