Repository navigation
feat(android): ISO 3166-2 region in addresses - #118
Merged
Merged
Conversation
Request FULL-ISO3166 for full billing and shipping addresses and return iso3166AdministrativeArea as CNPostalAddress.isoAdministrativeArea. MIN billing addresses are unchanged; iOS always omits the field. Fixes #90
jkasprzyk17
force-pushed
the
feat/android-iso-region-code
branch
from
November 23, 2026 11:42
0b63e8b to
26de04b
Compare
8 of 10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FULL-ISO3166format (Google release notes, 2025-11-01). This isFULLplusiso3166AdministrativeArea.CNPostalAddressgets an optionalisoAdministrativeArea, an ISO 3166-2 code such as'US-CA'. It is read fromiso3166AdministrativeAreaand uppercased.MINbilling address, asked for only to get a phone number, does not change.stateis free text, so a code can't be derived from it safely.api/types.md,guides/contact-details.md, README, CHANGELOG.Fixes #90
Test plan
cd package && bun run typecheckcd package && bun run lintcd package && bun run test(289 passed)cd package && bun run check:docsbun run docs:build./gradlew :gmisoftware_react-native-pay:testDebugUnitTest(193 passed; includes the new FULL-ISO3166 format and mapper asserts)./gradlew :app:assembleDebug -PreactNativeArchitectures=arm64-v8a(builds the regenerated JNI struct)xcodebuild test -scheme NitroPay-Unit-Tests(141 passed)bunx expo run:android: not run. The local emulators have no Google account, so Google Pay shows no card.bunx expo run:ios: not run. iOS only passesnil, and the unit tests cover it.Risk
"format": "FULL-ISO3166". If it rejects the value, every payment that asks for a billing or shipping contact fails. Before release, check on a signed-in device or emulator, ideally one with old Play services. If it fails there, make the format an opt-out.CNPostalAddresshas a new field, so this needs a native rebuild. Nothing changes in the JS API except one new optional field.Notes
play-services-walletversion for this format. The repo uses 20.0.0.PaymentSheetAddress(fromonShippingAddressChange) could carry the same code. Google sends it onIntermediateAddresstoo, and it would help with tax calculation before authorization.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.