Contact email
rou...@chromium.org, zk...@chromium.org
Explainer
https://github.com/zkoch/zkoch.github.io/blob/master/pr-detect-avail.md
Tag review
https://github.com/w3ctag/spec-reviews/issues/146
Summary
We add a new method onto PaymentRequest, canMakeActivePayment(), that returns back a boolean indicating whether or not the user has the ability to make a payment at the time PaymentRequest.show() is called.
var request = new PaymentRequest(supportedPaymentMethods, shoppingCartContents); if (request.canMakeActivePayment) { request.canMakeActivePayment().then(result => { console.log(result ? "Can make active payment" : "Cannot make active payment"); }).catch(err => { console.log(err); }); }
Motivation
We’ve heard very strong feedback from merchants that they would like to know before calling show() on PaymentRequest if a user has an available way to pay. Our initial response to this feedback was to call .show() and, if it throws, fall back to an existing checkout flow. This, however, has created challenges. Two are worth highlighting:
Interoperability and Compatibility Risk
The risk is moderate, because the specification is not mature, but the API footprint is small.
Ongoing technical constraints
None
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
The feature will be included on all platforms where PaymentRequest is supported. Support for PaymentRequest requires platform-specific UI. Currently only Android has UI for PaymentRequest. UI for Windows, Mac, Linux, and ChromeOS is in development.
OWP launch tracking bug
Link to entry on the feature dashboard
https://www.chromestatus.com/feature/5702608073261056
Requesting approval to ship?
Yes
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.