Intent to Ship: PaymentDetailsModifier.data

46 views
Skip to first unread message

Rouslan Solomakhin

unread,
Aug 14, 2017, 4:25:48 PM8/14/17
to blink-dev, Eiji Kitamura, zk...@chromium.org, anth...@chromium.org, Mathieu Perreault, goge...@chromium.org

Contact emails

rou...@chromium.org, zk...@chromium.org


Spec

https://w3c.github.io/payment-request/#dom-paymentdetailsmodifier-data


Summary

Add data member to PaymentDetailsModifier dictionary, where merchants can specify modifiers based on payment methods. This allows merchant to provide discounts for debit cards, for example.


Link to “Intent to Implement” blink-dev discussion

https://groups.google.com/a/chromium.org/d/msg/blink-dev/Dpc5Ftqgxlg/ZYenHNR0AgAJ


Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

No: it's not available on WebView. This is a subfeature of PaymentRequest, which requires UI. WebView does not have UI.


Demo link

https://rsolomakhin.github.io/pr/ uses modifiers to grant $10 discount for debit cards and $5 discount for MasterCard.


Interoperability and Compatibility Risk

Describe the degree of interoperability and compatibility risk. For a new feature, the main risk is that it fails to become an interoperable part of the web platform, if other do not implement it.


Edge: No signals

Firefox: In development

Safari: No signals

Web developers: Positive


Is this feature fully tested by web-platform-tests?

Although https://w3c-test.org/payment-request/ has many PaymentRequest tests, for `data`, the tests would need to access UI. The implementers have discussed this and have tentatively agreed to add testing support through https://marcoscaceres.github.io/payment-method-web-platform-test/, which we have not implemented yet.


OWP launch tracking bug

https://crbug.com/660926


Entry on the feature dashboard

https://www.chromestatus.com/feature/6636936064139264


Rick Byers

unread,
Aug 15, 2017, 3:48:32 PM8/15/17
to Rouslan Solomakhin, blink-dev, Eiji Kitamura, Zach Koch, anth...@chromium.org, Mathieu Perreault, goge...@chromium.org
Is there a spec that defines how 'data' is to be interpreted for the standard payment method types?  From the sample it seems that for 'basic-card' payments data is perhaps a BasicCardRequest, but I can't seem to find anything defining that.  I assume we'll need at least that mapping to be specified somewhere in order to have any sort of web-platform-tests for this new API.

Can you please link to the bug/details of the Firefox work here?

Thanks,
   Rick

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAMMzaWGu7Qv4F-6qBaeuZ6EvyjYVbhR28X52394ViJYJ4XraKg%40mail.gmail.com.

Rouslan Solomakhin

unread,
Aug 15, 2017, 3:57:24 PM8/15/17
to Rick Byers, blink-dev, Eiji Kitamura, Zach Koch, anth...@chromium.org, Mathieu Perreault, goge...@chromium.org
On Tue, Aug 15, 2017 at 3:48 PM, Rick Byers <rby...@chromium.org> wrote:
Is there a spec that defines how 'data' is to be interpreted for the standard payment method types?  From the sample it seems that for 'basic-card' payments data is perhaps a BasicCardRequest, but I can't seem to find anything defining that.  I assume we'll need at least that mapping to be specified somewhere in order to have any sort of web-platform-tests for this new API.


Can you please link to the bug/details of the Firefox work here?

Will get back to you with links.

mar...@marcosc.com

unread,
Aug 15, 2017, 10:51:21 PM8/15/17
to blink-dev, rou...@google.com, age...@google.com, zk...@chromium.org, anth...@chromium.org, ma...@chromium.org, goge...@chromium.org

Hi Rick!


On Wednesday, August 16, 2017 at 5:48:32 AM UTC+10, Rick Byers wrote:
Is there a spec that defines how 'data' is to be interpreted for the standard payment method types?

In step 14 of .show(), it states that:

  1. If required by the specification that defines the identifer, then convert data to an IDL value. Otherwise, convert to object.

From the sample it seems that for 'basic-card' payments data is perhaps a BasicCardRequest, but I can't seem to find anything defining that. 

Indeed, the basic-card spec doesn't say that .data is a `BasicCardRequest`. I'll fix that. I was trying to separate two specs ... but might have made the separation too great.   
 
I assume we'll need at least that mapping to be specified somewhere in order to have any sort of web-platform-tests for this new API.

Can you please link to the bug/details of the Firefox work here?

Rouslan Solomakhin

unread,
Aug 16, 2017, 10:53:35 AM8/16/17
to blink-dev, Eiji Kitamura, Zach Koch, anth...@chromium.org, Mathieu Perreault, goge...@chromium.org
On Mon, Aug 14, 2017 at 4:25 PM, Rouslan Solomakhin <rou...@google.com> wrote:

Demo link

https://rsolomakhin.github.io/pr/ uses modifiers to grant $10 discount for debit cards and $5 discount for MasterCard.


This demo requires chrome://flags/#enable-experimental-web-platform-features and chrome://flags/#web-payments-modifiers, by the way. (Once this ship intent is approved, the feature will be enabled by default.)

rou...@google.com

unread,
Aug 23, 2017, 1:13:55 PM8/23/17
to blink-dev, age...@google.com, zk...@chromium.org, anth...@chromium.org, ma...@chromium.org, goge...@chromium.org, rou...@google.com
I believe we've provided all relevant information. What else is necessary for the approvals to proceed?

Rick Byers

unread,
Aug 23, 2017, 1:49:08 PM8/23/17
to Rouslan Solomakhin, blink-dev, Eiji Kitamura, Zach Koch, anth...@chromium.org, Mathieu Perreault, goge...@chromium.org
Normally we want to see landed spec changes (or at least PRs) that fully define the behavior, so I was waiting to see progress on #40 myself before considering this ready.  But reading over it again, the issue makes the design pretty clear and it sounds like this is just a spec bug, not some omission that is yet to have consensus.  So that's good enough for me - LGTM1.

On Wed, Aug 23, 2017 at 1:13 PM, rouslan via blink-dev <blin...@chromium.org> wrote:
I believe we've provided all relevant information. What else is necessary for the approvals to proceed?

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.

Chris Harrelson

unread,
Aug 24, 2017, 1:13:23 AM8/24/17
to Rick Byers, Rouslan Solomakhin, blink-dev, Eiji Kitamura, Zach Koch, anth...@chromium.org, Mathieu Perreault, goge...@chromium.org
LGTM2

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFUtAY-NcwQyoWAzEUnVDBPwuq8%3DMbZY7JdWp6BQtH6XXigDqA%40mail.gmail.com.

Philip Jägenstedt

unread,
Aug 24, 2017, 6:20:48 AM8/24/17
to Chris Harrelson, Rick Byers, Rouslan Solomakhin, blink-dev, Eiji Kitamura, Zach Koch, anth...@chromium.org, Mathieu Perreault, goge...@chromium.org
I couldn't quite understand #40, so I left a comment. Nevertheless, seems minor or non-normative, so LGTM3.

On Thu, Aug 24, 2017 at 7:13 AM Chris Harrelson <chri...@chromium.org> wrote:
LGTM2

On Wed, Aug 23, 2017 at 10:48 AM, Rick Byers <rby...@chromium.org> wrote:
Normally we want to see landed spec changes (or at least PRs) that fully define the behavior, so I was waiting to see progress on #40 myself before considering this ready.  But reading over it again, the issue makes the design pretty clear and it sounds like this is just a spec bug, not some omission that is yet to have consensus.  So that's good enough for me - LGTM1.

On Wed, Aug 23, 2017 at 1:13 PM, rouslan via blink-dev <blin...@chromium.org> wrote:
I believe we've provided all relevant information. What else is necessary for the approvals to proceed?

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/191f71ec-57b6-4d52-861e-efd50f26f931%40chromium.org.

--
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+...@chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
Reply all
Reply to author
Forward
0 new messages