KEMBAR78
ContactAddress 'region' inconsistencies · Issue #65 · w3c/contact-picker · GitHub
Skip to content

ContactAddress 'region' inconsistencies #65

@TSMatthews

Description

@TSMatthews

I'm having a number of issues integrating our checkout with the payment request API when it comes to shipping options / shipping address forms. These centre around the address 'region', e.g. 'CA' in the US.

Project info / requirement
To give some background, I have a requirement to have shipping options that are available to certain regions within a country. This could be for legal reasons, e.g. in the US, only being able to ship certain goods to certain states. I must therefore, verify user inputted address region values against our shipping options when determining which shipping options to pass to the payment request interface.

Lack of 'region' input
Depending on the country however, sometimes the region is mandatory (US, Australia), optional (Ireland), missing (Qatar). Can this field be mandatory for all countries? (i.e. we would need 'region' to be mandatory in all cases so we can verify our shipping options against the user's country and state)

Inconsistency of input type and value
For both address forms that could be used, i.e. billing and shipping, the value retrieved from the user is not in a consistent format, in terms of input type and response value. On web browsers (as far as I've tested), the region is a dropdown. However, depending on the country, the value returned is not consistent, e.g. it's a 2 letter code such as 'CA' for the US, state name such as 'Delhi' for India, and 'Co. Dublin' for Ireland.

On mobile browsers (and possibly some web, but generally mobile), the 'region' is a free form input, so the customer could enter anything essentially, e.g. 'CA', 'California', 'Californnn'. In this case, we have no direct solution for mapping this value.

Overall solution proposal

  • 'Region' is mandatory.
  • 'Region' returns the state as a 2 letter code (ISO 3166-2), from a pre-defined set of values.

Metadata

Metadata

Assignees

Labels

i18n-trackerGroup bringing to attention of Internationalization, or tracked by i18n but not needing response.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions