Change description:
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);
});
}
Links:
Explainer: https://github.com/zkoch/zkoch.github.io/blob/master/pr-detect-avail.md
Tag review: https://github.com/w3ctag/spec-reviews/issues/146
Support in other browsers:
Internet Explorer: No public signals
Firefox: No public signals
Safari: No public signals
Comment 1 by bugdroid1@chromium.org
, Nov 18 2016