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

[FEATURE]: [Coinbase] Currency Unit Conversion #2221

Closed
2 tasks done
Sakilmostak opened this issue Sep 21, 2023 · 6 comments · May be fixed by #2658
Closed
2 tasks done

[FEATURE]: [Coinbase] Currency Unit Conversion #2221

Sakilmostak opened this issue Sep 21, 2023 · 6 comments · May be fixed by #2658
Assignees
Labels
A-connector-integration Area: Connector integration C-feature Category: Feature request or enhancement good first issue Good for newcomers hacktoberfest Issues that are up for grabs for Hacktoberfest participants

Comments

@Sakilmostak
Copy link
Contributor

📝 Feature Description

  • Each currency can be described in terms of base or minor units.
  • For instance, when dealing with USD currency, the Cent is considered as the minor unit, while the Dollar is considered the base unit.
  • In Hyperswitch, the amount value is expected to be always provided in minor units.
  • For example: In USD, If the amount is 1 in base unit (Dollar), then it will be equivalent to 100 in minor units (Cent)
  • Some of the connectors integrated require the amount to be converted to a desirable unit before being passed to them.
  • We have functions to_currency_base_unit and to_currency_lower_unit in place to convert the minor unit amount to its decimal equivalent and vice versa. These conversions are handled explicitly based on the connector.

🔨 Possible Implementation

  • ConnectorCommon trait have been implemented for the connector.
  • This trait contains get_currency_unit method. This method needs to be implemented.
  • It will define what type of conversion needs to be done during connector_router_data creation. Concurrently handle the creation of connector_router_data to be passed for the connector request body creation.
  • You can check this PR for further reference refactor(connector): [Zen] Enhance currency Mapping with ConnectorCurrencyCommon Trait #2196

🔖 Note: All the changes needed should be contained within hyperswitch/crates/router/src/connector/

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

  • I checked and didn't find a similar issue

📦 Have you read the Contributing Guidelines?

✨ Are you willing to submit a PR?

@Sakilmostak Sakilmostak added A-connector-integration Area: Connector integration C-feature Category: Feature request or enhancement S-awaiting-triage Status: New issues that have not been assessed yet hacktoberfest Issues that are up for grabs for Hacktoberfest participants labels Sep 21, 2023
@VedantKhairnar VedantKhairnar added the good first issue Good for newcomers label Sep 28, 2023
@TechWizard9999
Copy link

😊 "I'd be delighted to work on this issue! Could you please assign it to me?"

@AkshayaFoiger
Copy link
Contributor

Hey @TechWizard9999 , I see that you're already assigned to #2352. For now, we'll leave this issue open to any other interested contributors. You may pick this up once your work on #2352 is completed, and if no other contributors have expressed interest on this. I hope that's fine by you

@DhairyaMajmudar
Copy link

@VedantKhairnar @Sakilmostak pls. I would love to contribute to this issue pls. assign this to me

@swangi-kumari swangi-kumari removed the S-awaiting-triage Status: New issues that have not been assessed yet label Oct 17, 2023
@swangi-kumari
Copy link
Contributor

Hey @DhairyaMajmudar , sure! I've assigned this to you.

In case you have any queries, you can ask them on this issue thread, or on our discord server, or on slack whichever you are comfortable with.

@DhairyaMajmudar
Copy link

Hey @DhairyaMajmudar , sure! I've assigned this to you.

In case you have any queries, you can ask them on this issue thread, or on our discord server, or on slack whichever you are comfortable with.

Thank you for issue assignment

@SanchithHegde SanchithHegde linked a pull request Oct 22, 2023 that will close this issue
14 tasks
@Sakilmostak
Copy link
Contributor Author

Closing because currency conversion implementation have changed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-connector-integration Area: Connector integration C-feature Category: Feature request or enhancement good first issue Good for newcomers hacktoberfest Issues that are up for grabs for Hacktoberfest participants
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants