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

refactor(router): added a new type minor unit to amount #4629

Merged
merged 30 commits into from
May 21, 2024

Conversation

sahkal
Copy link
Contributor

@sahkal sahkal commented May 13, 2024

Type of Change

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

Description

Currently we have amount as i64 value, everywhere but we want it to be inside some Unit struct stating its denomination type. With this change we are adding MinorUnit as a new type which will flow through all core flows, and will send this type to connectors in upcoming pr's

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?

Flows to be tested

  • normal payments create -> payments confirm (all prod connectors)
  • capture flow
  • surcharge flow
  • mandate flow
  • payouts
  • FRM flows

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

@sahkal sahkal self-assigned this May 13, 2024
@sahkal sahkal marked this pull request as ready for review May 13, 2024 11:21
@sahkal sahkal requested review from a team as code owners May 13, 2024 11:21
@sahkal sahkal added A-core Area: Core flows C-refactor Category: Refactor S-waiting-on-review Status: This PR has been implemented and needs to be reviewed labels May 13, 2024
@sahkal sahkal modified the milestone: May 2024 Release May 13, 2024
crates/api_models/src/payments.rs Outdated Show resolved Hide resolved
crates/api_models/src/payments.rs Outdated Show resolved Hide resolved
@sahkal sahkal requested a review from jarnura May 14, 2024 13:56
jarnura
jarnura previously approved these changes May 15, 2024
jarnura
jarnura previously approved these changes May 20, 2024
): fixed open api specs
Copy link
Member

@vspecky vspecky left a comment

Choose a reason for hiding this comment

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

Approved on behalf of @juspay/hyperswitch-routing

@@ -75,7 +75,7 @@ impl<F: Send + Clone>
})?
}

if request.amount < payment_intent.amount {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why was this needed?

@Gnanasundari24 Gnanasundari24 added this pull request to the merge queue May 21, 2024
Merged via the queue into main with commit 443b7e6 May 21, 2024
13 checks passed
@Gnanasundari24 Gnanasundari24 deleted the change_core_amount_to_domain_type branch May 21, 2024 10:24
@SanchithHegde SanchithHegde removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label May 26, 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 C-refactor Category: Refactor high-risk
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants