juspay / hyperswitch

An open source payments switch written in Rust to make payments fast, reliable and affordable
https://hyperswitch.io/
Apache License 2.0
12.31k stars 1.32k forks source link

[REFACTOR]: [NUVEI] Add amount conversion framework to Nuvei #6023

Open mrudulvajpayee4935 opened 4 weeks ago

mrudulvajpayee4935 commented 4 weeks ago

:memo: Feature Description

Currently, amounts are represented as i64 values throughout the application. We want to introduce a Unit struct that explicitly states the denomination. A new type, MinorUnit, has been added to standardize the flow of amounts across the application. This type will now be used by all the connector flows.

Rather than handling conversions in each connector, we will centralize the conversion logic in one place within the core of the application.

:hammer: Possible Implementation

🔖 Note: All the changes needed should be contained within hyperswitch/crates/router/src/connector/ , crates/router/src/types/api.rs , crates/router/tests/connectors/

:package: Have you spent some time checking if this feature request has been raised before?

:package: Have you read the Contributing Guidelines?

:package: Submission Process:

Refer here for Terms and conditions for the contest.

:sparkles: Are you willing to submit a PR?

kaustubh1106 commented 3 weeks ago

@mrudulvajpayee4935 sir I want to work on this issue

kaustubh1106 commented 3 weeks ago

@mrudulvajpayee4935 can you please reveiw my PR and please can you help me with its testing how can I test it can you provide me the steps

gorakhnathy7 commented 3 weeks ago

Hey @kaustubh1106 Thanks for working on this! This will be reviewed soon!

Ankesh2004 commented 3 weeks ago

Hi @gorakhnathy7 , I would like to work on this issue. Please assign it to me.

sOnU1002 commented 3 weeks ago

hey i can work on it please assign it to me

gorakhnathy7 commented 3 weeks ago

Hey @Ankesh2004 @sOnU1002 Thanks for showing interest, But there is another PR in review, which can close this issue. To save everyone's time I would suggested picking another issue.

kaustubh1106 commented 2 weeks ago

hi @mrudulvajpayee4935 are there any changes I need to do ?

mrudulvajpayee4935 commented 2 weeks ago

hey @kaustubh1106 i will review this and let you know.