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(payment): Add audit events for PaymentStart update #4800

Closed

Conversation

kaustubh1106
Copy link
Contributor

@kaustubh1106 kaustubh1106 commented May 29, 2024

Type of Change

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

Description

update the paymentstart 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

Add audit events for PaymentStart update
following files have been changed:
crates/router/src/core/payments/operations/patment_start.rs
crates/router/src/events/audit_events.rs

Motivation and Context

#4681

How did you test it?

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

@kaustubh1106 kaustubh1106 requested review from a team as code owners May 29, 2024 04:25
@kaustubh1106 kaustubh1106 changed the title [feature] Add audit events for PaymentStart update feat(payment) Add audit events for PaymentStart update May 29, 2024
@kaustubh1106 kaustubh1106 changed the title feat(payment) Add audit events for PaymentStart update feat(payment): Add audit events for PaymentStart update May 29, 2024
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.

Rename the variant to a verb
Rest looks good

@@ -219,6 +219,11 @@ impl<F: Clone> UpdateTracker<F, PaymentData<F>, api::PaymentsStartRequest> for P
where
F: 'b + Send,
{
_req_state
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
_req_state
req_state

Copy link
Contributor Author

@kaustubh1106 kaustubh1106 May 30, 2024

Choose a reason for hiding this comment

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

hey @lsampras the passed variable is _req_state shouldn't we use it in that way only?? just asking, I am a beginner

@@ -219,6 +219,11 @@ impl<F: Clone> UpdateTracker<F, PaymentData<F>, api::PaymentsStartRequest> for P
where
F: 'b + Send,
{
_req_state
.event_context
.event(AuditEvent::new(AuditEventType::PaymentStarted))
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
.event(AuditEvent::new(AuditEventType::PaymentStarted))
.event(AuditEvent::new(AuditEventType::PaymentStart))

@lsampras lsampras added A-framework Area: Framework C-feature Category: Feature request or enhancement A-Analytics labels May 31, 2024
@lsampras lsampras linked an issue May 31, 2024 that may be closed by this pull request
@kaustubh1106 kaustubh1106 force-pushed the paymentStartEventChanges branch from 4cc51fc to f513c8e Compare July 3, 2024 16:55
@kaustubh1106 kaustubh1106 deleted the paymentStartEventChanges branch July 3, 2024 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Analytics A-framework Area: Framework C-feature Category: Feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add audit events for PaymentStart update
2 participants