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(events): Add audit events payment confirm #4763

Merged
merged 11 commits into from
Jun 10, 2024

Conversation

Abhitator216
Copy link
Contributor

@Abhitator216 Abhitator216 commented May 24, 2024

Type of Change

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

Description

  • Pass along request_state to payment_core
  • Update updatetrackers trait to accept request state
  • Update the paymentconfirm implementation of updatetracker to generate an event

Additional Changes

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

Motivation and Context

  • Generating domain events that can be used to track the high level overview of any process

How did you test it?

Test Case Description

  • Implemented an event trigger that activates whenever the payment confirm API is utilized. This event triggers an audit event, the details of which are subsequently reflected in the Kafka UI.
  • Create a payment & then confirm it
  • Fields that need to be tested are: client_src, client_verand frm_message.
{"topic" = "hyperswitch-audit-events"}

image

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

@Abhitator216 Abhitator216 requested review from a team as code owners May 24, 2024 11:57
@Abhitator216 Abhitator216 self-assigned this May 24, 2024
@Abhitator216 Abhitator216 changed the title Add audit events payement confirm feat(events): Add audit events payement confirm May 24, 2024
@Abhitator216 Abhitator216 changed the title feat(events): Add audit events payement confirm feat(events): Add audit events payment confirm May 24, 2024
@Abhitator216 Abhitator216 linked an issue May 24, 2024 that may be closed by this pull request
Copy link
Member

@lsampras lsampras left a comment

Choose a reason for hiding this comment

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

minor nits

config/development.toml Show resolved Hide resolved
crates/router/src/events/audit_events.rs Outdated Show resolved Hide resolved
crates/router/src/events/audit_events.rs Outdated Show resolved Hide resolved
lsampras
lsampras previously approved these changes Jun 3, 2024
lsampras
lsampras previously approved these changes Jun 4, 2024
@@ -566,7 +566,7 @@ soft_kill = false
enabled = true

[events]
source = "logs"
source = "kafka"

[events.kafka]
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you remove this change, as this is for local development

@Abhitator216 Abhitator216 requested a review from ivor11 June 7, 2024 10:26
@likhinbopanna likhinbopanna added this pull request to the merge queue Jun 10, 2024
Merged via the queue into main with commit eb0101f Jun 10, 2024
21 of 22 checks passed
@likhinbopanna likhinbopanna deleted the add-audit-events-payement-confirm branch June 10, 2024 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add audit events for PaymentConfirm update
5 participants