juspay/hyperswitch

[FEATURE] Standardize `state` field in billing and shipping address

Open

#2.939 geöffnet am 21. Nov. 2023

Auf GitHub ansehen
 (6 Kommentare) (0 Reaktionen) (1 zugewiesene Person)Rust (4.676 Forks)batch import
C-featuregood first issuehelp wanted

Repository-Metriken

Stars
 (42.690 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 8T 12h) (212 gemergte PRs in 30 T)

Beschreibung

Feature Description

Currently, we accept the state field in both shipping and billing addresses as a string. However, in a few connectors like Cybersource, we have a mapping from state names to state codes. We propose standardizing the state field to accept only ISO 3166-2 codes (https://en.wikipedia.org/wiki/ISO_3166-2)

Possible Implementation

We can use some crate that helps in validating ISO 3166-2 codes and accept these codes in payment request

Contributor Guide