From 26b092664b26cf06293a3eab462ef8c4005c82f5 Mon Sep 17 00:00:00 2001 From: Ade Bateman Date: Tue, 7 Jun 2016 17:29:36 -0700 Subject: [PATCH] Rename remaining types so that all begin Payment* --- index.html | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/index.html b/index.html index cea239d4..156fc1e0 100644 --- a/index.html +++ b/index.html @@ -254,6 +254,11 @@

PaymentRequest interface

user agent while the user is providing input before approving or denying a payment request.

+

+ The shippingAddress and shippingOption attributes + are populated during processing if the requestShipping flag is set. +

+

The [SecureContext] extended attribute means that the PaymentRequest is only exposed within a secure context and won't be accessible elsewhere. @@ -420,11 +425,11 @@

PaymentRequest constructor

  • If details contains a shippingOptions sequence with a length of 1, then set shippingOption to the id of - the only ShippingOption in the sequence. + the only PaymentShippingOption in the sequence.
  • If details contains a shippingOptions sequence with a - length greater than 1, and if any ShippingOption in the sequence + length greater than 1, and if any PaymentShippingOption in the sequence has the selected field set to true, then set shippingOption to the id of the last ShippingOption in the sequence with selected set to true. @@ -634,16 +639,16 @@

    PaymentMethodData dictionary

    -

    CurrencyAmount

    +

    PaymentCurrencyAmount

    -dictionary CurrencyAmount {
    +dictionary PaymentCurrencyAmount {
       required DOMString currency;
       required DOMString value;
     };
           

    - A CurrencyAmount dictionary is used to supply monetary amounts. - The following fields MUST be supplied for a CurrencyAmount to be valid: + A PaymentCurrencyAmount dictionary is used to supply monetary amounts. + The following fields MUST be supplied for a PaymentCurrencyAmount to be valid:

    currency
    @@ -680,7 +685,7 @@

    PaymentDetails dictionary

    dictionary PaymentDetails { PaymentItem total; sequence<PaymentItem> displayItems; - sequence<ShippingOption> shippingOptions; + sequence<PaymentShippingOption> shippingOptions; }; @@ -782,7 +787,7 @@

    PaymentItem dictionary

             dictionary PaymentItem {
               required DOMString label;
    -          required CurrencyAmount amount;
    +          required PaymentCurrencyAmount amount;
             };
           

    @@ -798,7 +803,7 @@

    PaymentItem dictionary

    this to the user.
    amount
    - A CurrencyAmount containing the monetary amount for the item. + A PaymentCurrencyAmount containing the monetary amount for the item.
    There is an open issue about whether it should be possible to provide a PaymentItem with amounts in more than once currency. @@ -875,17 +880,17 @@

    PaymentAddress interface

    -

    ShippingOption interface

    +

    PaymentShippingOption interface

    -        dictionary ShippingOption {
    +        dictionary PaymentShippingOption {
               required string id;
               required string label;
    -          required CurrencyAmount amount;
    +          required PaymentCurrencyAmount amount;
               boolean selected = false;
             };
           

    - The ShippingOption dictionary has fields describing a shipping option. A web page can + The PaymentShippingOption dictionary has fields describing a shipping option. A web page can provide the user with one or more shipping options by calling the updateWith method in response to a change event.

    @@ -894,17 +899,17 @@

    ShippingOption interface

    id
    -
    This is a string identifier used to reference this ShippingOption. It MUST be +
    This is a string identifier used to reference this PaymentShippingOption. It MUST be unique for a given PaymentRequest.
    label
    This is a human-readable description of the item. The user agent SHOULD use this string to display the shipping option to the user.
    amount
    - A CurrencyAmount containing the monetary amount for the item. + A PaymentCurrencyAmount containing the monetary amount for the item.
    selected
    -
    This is set to true to indicate that this is the default selected ShippingOption +
    This is set to true to indicate that this is the default selected PaymentShippingOption in a sequence. User agents SHOULD display this option by default in the user interface.
    @@ -1194,7 +1199,7 @@

    Shipping option changed algorithm

  • Let name be shippingoptionchange.
  • Set the shippingOption attribute on request to the - id string of the ShippingOption provided by the user. + id string of the PaymentShippingOption provided by the user.
  • Run the PaymentRequest updated algorithm with request and name.