hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

feat(payments): Add audit events for PaymentStatus update

Open Rutam21 opened this issue 1 year ago • 2 comments

Type of Change

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

Description

This PR adds an Audit event for the PaymentStatus operation.

Additional Changes

  • [x] This PR modifies the files below

  • crates/router/src/core/payments/operations/payment_status.rs

  • crates/router/src/events/audit_events.rs

Motivation and Context

This PR fixes #4677

How did you test it

This requires FRM-related flows to be tested, and may not be tested locally.

Checklist

  • [x] I formatted the code cargo +nightly fmt --all
  • [x] I addressed lints thrown by cargo clippy
  • [x] I reviewed the submitted code

Rutam21 avatar Nov 08 '24 12:11 Rutam21

Review changes with  SemanticDiff

Changed Files
File Status
  crates/router/src/core/payments/operations/payment_status.rs  0% smaller
  crates/router/src/events/audit_events.rs  0% smaller

semanticdiff-com[bot] avatar Nov 08 '24 12:11 semanticdiff-com[bot]

Please review and suggest changes, if any. Thanks.

cc: @tsdk02 @Chethan-rao @gorakhnathy7

Rutam21 avatar Dec 12 '24 09:12 Rutam21

Hey @Rutam21, Can you set this up locally, and try to create a payment. You can test the PaymentStatus update when you hit the Payments - Retrieve endpoint.

Try to check if you are able to log this in the hyperswitch-audit-events topic in kafka, and paste the screenshots under the How did you test it section. Thanks

tsdk02 avatar Dec 12 '24 11:12 tsdk02

@Rutam21 I have tested this PR locally, and updated the test cases. Seems to be working fine. This PR looks good to get merged.

tsdk02 avatar Dec 16 '24 07:12 tsdk02

@likhinbopanna This PR has been approved and is ready to be added to the merge queue. Please do the needful. Thanks.

Rutam21 avatar Dec 16 '24 09:12 Rutam21