From 385257afc827872011fd5a00a5b1781f480b392f Mon Sep 17 00:00:00 2001
From: rvm4
A web page creates a PaymentRequest interface
Promise<PaymentResponse> show();
void abort();
- readonly attribute ShippingAddress? shippingAddress;
+ readonly attribute PartialShippingAddress? partialShippingAddress;
readonly attribute DOMString? shippingOption;
/* Supports "shippingaddresschange" event */
@@ -242,7 +242,7 @@ PaymentRequest interface
PaymentRequest to make a payment request. This is
- typically associated with the user initiating a payment process
+ typically associated with the user initiating a payment process
(e.g., selecting a "Power Up" in an interactive game, pulling up to an automated kiosk in a parking structure,
or activating a "Buy", "Purchase", or "Checkout" button).
The PaymentRequest allows the web page to exchange information with the
@@ -276,11 +276,11 @@ PaymentRequest constructor
method specific data.
data into request@[[\data]].shippingAddress attribute on request to null.
+ Set the value of the partialShippingAddress attribute on request to null.
shippingOption attribute on request to null.
@@ -516,16 +516,20 @@ The internal slot [[\state]] follows the following state transitions:
-
- shippingAddress is populated when the user provides a shipping
- address. It is null by default.
+ partialShippingAddress is populated when the user provides a shipping
+ address before payment has been approved. It is null by default.
When a user provides a shipping address, the shipping address changed algorithm runs.
+ A PartialShippingAddress should provide minimal information to identify potential shipping
+ options. For instance, in the United States, the state and postal code would be specific
+ enough to determine shipping options, but would not leak sensitive user information
+ to the client before the user has approved a payment.
onshippingaddresschange is an EventHandler for an
@@ -605,13 +609,13 @@
A CurrencyAmount dictionary is used to supply monetary amounts.
The following fields MUST be supplied for a CurrencyAmount to be valid:
@@ -627,8 +631,8 @@
value^-?[0-9]+(\.[0-9]+)?$.
@@ -768,8 +772,8 @@
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.
+ shippingAddress field of the PaymentResponse object with
+ the user's selected shipping address after the user has accepted the payment.
ShippingAddress interface are
@@ -781,6 +785,25 @@
+ interface PartialShippingAddress {
+ /* [...] fields TBC */
+ };
+
+
+ If the requestShipping flag was set to true in the PaymentOptions
+ passed to the PaymentRequest constructor, then the user agent will populate the
+ partialShippingAddress field of the PaymentRequest object with
+ the user's selected shipping address.
+
PartialShippingAddress interface are
+ yet to be defined, but they are a minimal subset of the fields of ShippingAddress.
+ @@ -818,6 +841,7 @@PaymentResponse interface
interface PaymentResponse { readonly attribute DOMString methodName; readonly attribute object details; + readonly attribute ShippingAddress? shippingAddress; Promise<void> complete(boolean success); }; @@ -838,6 +862,12 @@PaymentResponse interface
A JSON-serializable object that provides a payment method specific message used by the merchant to process the transaction and determine successful fund transfer. +
shippingAddresstrue in the PaymentOptions
+ passed to the PaymentRequest constructor, then shippingAddress will
+ be the full and final shipping address chosen by the user.
+ - This specification should describe how the user agent will pass the - payment request data and the complete signal to a native payment app + This specification should describe how the user agent will pass the + payment request data and the complete signal to a native payment app and also how it will receive the payment response from the payment app.