w3c / payment-request

Payment Request API
https://www.w3.org/TR/payment-request/
Other
489 stars 135 forks source link

Pre-filter shipping addresses, e.g. by country #614

Open dandv opened 7 years ago

dandv commented 7 years ago

If a merchant only ships to certain regions, it would be useful to pre-filter the shipping addresses the user can select from. The case of no eligible address would be quite frequent - the user could see instead an explanation provided by the merchant, along with an affordance for adding an eligible address.

Example use cases:

marcoscaceres commented 7 years ago

Smarter filtering would be nice. However, it would mean passing all addresses to the merchant, and that doesn't seem great from a privacy perspective...

Conversely, the merchant would need to pass in all the states for each country that they support. That could be more doable, but we would need a standardized list of all the states/provinces/regions in the world.

dandv commented 7 years ago

the merchant would need to pass in all the states for each country that they support

ISO3166 standardizes the country code. Provinces and regions are more of a can of worms, agreed, but perhaps filtering by country would cover 80% of the use cases.

marcoscaceres commented 6 years ago

Turns out ISO3166 also does regions (things you learn 👨‍🏫).

Step 1 will be do add region codes to w3c/contact-picker#65.

ianbjacobs commented 8 months ago

This issue was raised in Payment Request, but closed once we removed addresses from that API. We anticipate adding addresses back to the specification and so are re-opening this issue proactively.

ianbjacobs commented 2 months ago

We added addresses back to the specification in the 7 August 2024 CRD