Intent to Implement: PaymentDetailsModifier.data

27 views
Skip to first unread message

Rouslan Solomakhin

unread,
Nov 23, 2016, 12:48:25 PM11/23/16
to blink-dev
Contact emails rou...@chromium.org Spec https://w3c.github.io/browser-payment-api/#paymentdetailsmodifier-dictionary Summary
Add data member to PaymentDetailsModifier dictionary, where merchants can specify modifiers based on payment methods.
Motivation One use case for this is to support card payments with different modifiers for credit vs. debit cards. For example, the default shopping cart might be:

var supportedMethods = [{supportedMethods: ["basic-card"]}];
var shoppingCart = {total: {title: "Total",
                            currency: {code: "USD", value: "5.00"}}};
new PaymentRequest(supportedMethods, shoppingCart); 

Where's modifier for debit cards can look like this:

shoppingCart.modifiers = [{
    data: {supportedType: ["debit"]}, // NEW FEATURE
    supportedMethods: ["basic-card"],
    total: {title: "Total",
            currency: {code: "USD", value: "4.63"}}}];
Interoperability risk Firefox: No public signals
Edge: No public signals
Safari: No public signals
Web developers: Positive
Compatibility risk Low. Other browsers have not implemented PaymentRequest yet. No merchants are known to be using PaymentDetailsModifier yet.
  Ongoing technical constraints None Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)? Yes or no. No. This feature will be implemented everywhere PaymentRequest is implemented, which is currently only Android and eventually all platforms except WebView. OWP launch tracking bug http://crbug.com/660926 Link to entry on the Chrome Platform Status https://www.chromestatus.com/feature/6636936064139264 Requesting approval to ship? No
Reply all
Reply to author
Forward
0 new messages