[w3c/browser-payment-api] Add `enableLegacyCheckout` option to PaymentOptions. (#365)

Currently, when a payer cannot or does not want to choose one of the payment methods provided in the PaymentRequest, they must cancel it. However, it could be that they can still complete the payment on the payee website via a custom checkout experience (and their shipping information could still be propagated). Requiring the payer to cancel the PaymentRequest in these circumstances is less than graceful.

This proposal adds a flag to tell the user agent to provide an option (on the user interface) to complete checkout on the payee's website if the payer can't or does not want to select a payment method. The payer can make this selection when necessary instead of canceling the PaymentRequest.

We may also want to consider adding options to the `show()` method instead of adding an option to the PaymentRequest constructor. That would allow other calls to be made on the PaymentRequest instance before a decision is made as to whether or not the legacy checkout option should be shown.

The `enableLegacyCheckout` name is open to bikeshedding.

The current version of this proposal sets the `methodName` on the PaymentResponse to `null` to indicate that no payment method was selected (instead, legacy checkout was selected) by the user. I'd like to know if that seems reasonable to implementers or if they have a better approach. Note that the user can still provide their shipping information through this mechanism (as currently proposed), even if they handle the payment via the legacy checkout.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Add `enableLegacyCheckout` option to PaymentOptions.

-- File Changes --

    M index.html (28)

-- Patch Links --

https://github.com/w3c/browser-payment-api/pull/365.patch
https://github.com/w3c/browser-payment-api/pull/365.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/365

Received on Friday, 9 December 2016 18:24:19 UTC