From 2f43ce3633fefaceaed50796c149ec8742de6d29 Mon Sep 17 00:00:00 2001 From: Ade Bateman Date: Wed, 8 Jun 2016 08:53:39 -0700 Subject: [PATCH 1/2] Remove special case handling for single shipping option. --- index.html | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/index.html b/index.html index 156fc1e0..0a95881e 100644 --- a/index.html +++ b/index.html @@ -423,13 +423,8 @@

PaymentRequest constructor

Set the value of the shippingOption attribute on request to null.
  • - If details contains a shippingOptions sequence with a - length of 1, then set shippingOption to the id of - the only PaymentShippingOption in the sequence. -
  • -
  • - If details contains a shippingOptions sequence with a - length greater than 1, and if any PaymentShippingOption in the sequence + If details contains a shippingOptions sequence 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. @@ -1123,13 +1118,8 @@

    PaymentRequestUpdateEvent

  • Let newOption be null.
  • - If details contains a shippingOptions sequence with a - length of 1, then set newOption to the id of the only - ShippingOption in the sequence. -
  • -
  • - If details contains a shippingOptions sequence with a - length greater than 1, and if any ShippingOption in the sequence + If details contains a shippingOptions sequence + and if any ShippingOption in the sequence has the selected field set to true, then set newOption to the id of the last ShippingOption in the sequence with selected set to true. From 749ff2eaf1b6d080eec498087811947485bee2df Mon Sep 17 00:00:00 2001 From: Ade Bateman Date: Wed, 8 Jun 2016 10:34:36 -0700 Subject: [PATCH 2/2] Remove other notes about one shipping option item. --- index.html | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/index.html b/index.html index 0a95881e..61a42be6 100644 --- a/index.html +++ b/index.html @@ -715,9 +715,6 @@

    PaymentDetails dictionary

    A sequence containing the different shipping options for the user to choose from.

    If the sequence is empty, then this indicates that the merchant cannot ship to the current shippingAddress.

    -

    If the sequence only contains one item, then this is the shipping option that - will be used and shippingOption will be set to the id - of this option without running the shipping option changed algorithm.

    If an item in the sequence has the selected field set to true, then this is the shipping option that will be used by default and shippingOption will be set to the id of this option without running the shipping option changed @@ -728,7 +725,7 @@

    PaymentDetails dictionary

    constructed with PaymentOptions requestShipping set to true.

    - If the sequence contains only one item or if the sequence has an item with the selected + If the sequence has an item with the selected field set to true, then authors SHOULD ensure that the total field includes the cost of the shipping option. This is because no shippingoptionchange event will be fired for this option unless the user selects an alternative option first.