w3c / payment-request

Payment Request API
https://www.w3.org/TR/payment-request/
Other
486 stars 133 forks source link

Spec hasEnrolledInstrument #830

Closed danyao closed 5 years ago

danyao commented 5 years ago

I started implementing hasEnrolledInstrument in Chrome according to the WG agreement [1]. It will be great if this API and the change to canMakePayment can be added to the spec language. I'd like to kick off an Intent to Ship thread in blink-dev@ soon as an official announcement of the canMakePayment behavior change to web developers.

[1] https://lists.w3.org/Archives/Public/public-payments-wg/2018Nov/0018.html

marcoscaceres commented 5 years ago

@danyao, definitely would like to get onto this, but we have a couple of constraints on us at the moment. Rest easy that none of the constraints prevents us from spec'ing this out! - just want to be clear on how we are going to do this:

  1. We can spin up a new branch for "hasEnrolledInstrument", and start adding the spec text into that. That should give you something to point to in your intent to ship, with the promise that it will be part of the Payment Request API version 1.1 (but not 1.0!). As part of that, we should collaborate to get the WP Tests ready - and we need to get implementation commitment from Safari too (they have been supportive, so should be no problem - but we need a bug filed on their side, and a "đź‘Ť" from @aestes).

  2. In parallel, we need to finish and merge the last two PRs. That will allow us to consider the spec ready for another "CR" round (that CR round will take around 6 weeks).

  3. We need to update the implementation report by re-running all the tests in the test suite (including the manual tests). We need to get 100% on two implementations. We are really close - but we are counting on the Chrome team here to help us get over the line.

  4. Once the current 1.0 spec is at stable point and ready for Proposed Recommendation, we can start merging in the actual "hasEnrolledInstrument" method spec text into the spec. This can happen quite quickly, but we need to be at a stable point where we can do the 1.0 release.

What would help a lot at this point is having a link to the Blink implementation for hasEnrolledInstrument. We can base the spec text around your implementation and keep everything in sync.

Sound like a plan? Cc'ing @rsolomakhin so he is also aware of the plan.

rsolomakhin commented 5 years ago

@marcoscaceres wrote:

We are counting on the Chrome team here to help us get over the line.

What specifically is needed from us?

ianbjacobs commented 5 years ago

Hi @rsolomakhin and @danyao (and @aestes and @zouhir),

Here is the implementation report for PR API v1: https://w3c.github.io/test-results/payment-request/all.html

(Whoops, hit enter too soon)

Here is the report that shows tests where we have fewer than 2 passing implementations: https://w3c.github.io/test-results/payment-request/less-than-2.html

There are some tests that may be going away (e.g., PaymentAddress interface: attribute regionCode since we are deleting that feature from v1).

But any effort to turn red to green would be very helpful to enabling us to finish PR API v1 in a timely fashion.

Ian

danyao commented 5 years ago

Sounds like a good plan!

https://crbug.com/915907 tracks Blink's implementation of hasEnrolledInstrument. I just landed the last CL today, so it'll be available in tomorrow's canary build behind the --enable-features=PaymentRequestHasEnrolledInstrument flag. I'll look into adding some Web Platform Tests.

marcoscaceres commented 5 years ago

Thanks for the update @danyao! Do you want to have first go at spec'ing it out? I was thinking we could abstract out canMakePayment()'s steps into its own independent algorithm, and them just add a "checkForInstruments" boolean as an argument.

WDYT?

danyao commented 5 years ago

Sounds good. I'll take a stab at it.

On Mon, Feb 4, 2019 at 10:39 PM Marcos Cáceres notifications@github.com wrote:

Thanks for the update @danyao https://github.com/danyao! Do you want to have first go at spec'ing it out? I was thinking we could abstract out canMakePayment()'s steps into its own independent algorithm, and them just add a "checkForInstruments" boolean as an argument.

WDYT?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/w3c/payment-request/issues/830#issuecomment-460502126, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ8kXNKXnCHejjVdOYgcRx2zMXq0PM1zks5vKP0KgaJpZM4aamL_ .