[w3c/browser-payment-api] Add support for ShippingOption.selected. (#179)

This PR affects the case when `requestShipping` is `true`.

Currently the spec supports the idea that providing no shipping options means that the current shipping address is not supported and that providing a single shipping option means that shipping option should be used. This helps to smooth the payment request experience because the user doesn't have to pick a shipping option.

If more than one shipping option is provided, the merchant may still know which they want to be the default and they should be able to indicate this so that the user doesn't have to explicitly pick one. Also, if the user chooses a shipping address, and then chooses a shipping option, but then changes to a different shipping address, the merchant should be able to preserve the user's choice of option even after recalculating new shipping costs.

This PR adds a `selected` field to the `ShippingOption` and updates the algorithms to use it.
You can view, comment on, or merge this pull request online at:

  https://github.com/w3c/browser-payment-api/pull/179

-- Commit Summary --

  * Add support for ShippingOption.selected.

-- File Changes --

    M specs/paymentrequest.html (30)

-- Patch Links --

https://github.com/w3c/browser-payment-api/pull/179.patch
https://github.com/w3c/browser-payment-api/pull/179.diff

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/browser-payment-api/pull/179

Received on Wednesday, 4 May 2016 15:13:48 UTC