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

[FEATURE] add a mapping of countries in CountryAlpha2 enum to countries in human readable format for payout links #6083

Open kashif-m opened 1 month ago

kashif-m commented 1 month ago

Problem Statement Display countries in human readable format in the dropdown for payout widget.

Details Payout component in SDK collects the required details for processing payouts. This widget has a form for selecting the recipient's address - fields like name, city, postal code and country is collected and sent to backend service. The fields to be collected are embedded in the payout link during initialization. Country for payout widget are always in CountryAlpha2 format as backend API requires it. However, it's not in a human readable format.

Task Consume already existing Country module for mapping the CountryAlpha2 enums to a human readable format for the payout widget.

HarshitVashisht11 commented 3 weeks ago

Hi can I work on this issue

gorakhnathy7 commented 3 weeks ago

Hey @HarshitVashisht11 Thanks for your interest, assigned the issue to you! Kindly let us know, if you need any help.

HarshitVashisht11 commented 3 weeks ago

Could you provide more specifics on which files need to be modified to resolve this issue?

kashif-m commented 2 weeks ago

@HarshitVashisht11 - can you try setting this up locally as a pre-requisite?

You need to make sure below components are up and running for testing payout links

Once you have the local setup up and running, you can create a payout link locally. You can use this doc for reference - https://docs.hyperswitch.io/features/payment-flows-and-management/payouts/payout-link

kashif-m commented 2 weeks ago

@PritishBudhiraja - could you guide @HarshitVashisht11 with this task?

kashif-m commented 2 weeks ago

Hi @HarshitVashisht11, were you able to move forward with this? Were you able to setup hyperswitch and Hyperswitch-web locally?

This is a straightforward task for using a mapper function for converting country ISO code (for example, IN) to a more readable format (for example, India).

There exists a Country module (https://github.com/juspay/hyperswitch-web/blob/main/src/Country.res#L18) which needs to be incorporated during render of the dropdown in Payout Links.

HarshitVashisht11 commented 2 weeks ago

Thank you, I have try to run locally hyperswitch and hyperswitch-web but after running cargo run the compilation process keep getting stuck at Compiling router v0.2.0 (/app/crates/router)