From 192c3fd1433ee96fb75473d2e3b293a95bf2716c Mon Sep 17 00:00:00 2001 From: Rouslan Solomakhin Date: Thu, 21 Apr 2016 10:02:22 -0700 Subject: [PATCH] Specify shipping address fields based on OASIS xAL. --- specs/paymentrequest.html | 42 ++++++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/specs/paymentrequest.html b/specs/paymentrequest.html index 10a8cccf..fa7f3924 100644 --- a/specs/paymentrequest.html +++ b/specs/paymentrequest.html @@ -767,19 +767,51 @@

PaymentItem dictionary

ShippingAddress interface

         interface ShippingAddress {
-          /* [...] fields TBC */
+          readonly attribute DOMString regionCode;
+          readonly attribute sequence addressLine;
+          readonly attribute DOMString administrativeArea;
+          readonly attribute DOMString locality;
+          readonly attribute DOMString dependentLocality;
+          readonly attribute DOMString postalCode;
+          readonly attribute DOMString sortingCode;
+          readonly attribute DOMString languageCode;
+          readonly attribute DOMString organization;
+          readonly attribute DOMString recipient;
         };
       
+
+
regionCode
+
This is the CLDR (Common Locale Data Repository) region code. For example, US, GB, CN, or JP.
+
addressLine
+
This is the most specific part of the address. It can include, for example, a street + name, a house number, apartment number, a rural delivery route, descriptive + instructions, or a post office box number.
+
administrativeArea
+
This is the top level administrative subdivision of the country. For example, this can + be a state, a province, an oblast, or a prefecture.
+
locality
+
This is the city/town portion of the address.
+
dependentLocality
+
This is the dependent locality or sublocality. For example, used for neighborhoods, + boroughs, districts, or UK dependent localities.
+
postalCode
+
This is the postal code or ZIP code, also known as PIN code in India.
+
sortingCode
+
This is the sorting code as used in, for example, France.
+
languageCode
+
This is the BCP-47 language code for the address. It's used to determine the field + separators and the order of fields when formatting the address for display.
+
organization
+
This is the organization, firm, company, or institution at this address.
+
recipient
+
This is the name of the recipient or contact person.
+

If the requestShipping flag was set to true in the PaymentOptions passed to the PaymentRequest constructor, then the user agent will populate the shippingAddress field of the PaymentRequest object with the user's selected shipping address.

-
- The fields of the ShippingAddress interface are - yet to be defined. -
There is an open question about what data beyond shipping address the merchant might be able to request from the user agent. Is capturing email and recipient phone important to you?