New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 752835 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

[Payment Handler] instrumentKey does not appear to be set.

Project Member Reported by ma...@chromium.org, Aug 7 2017

Issue description

In my service worker payment app, the "instrumentKey" property is not set when a paymentrequest event comes.

self.addEventListener('paymentrequest', function(e) {
  // e.instrumentKey is not set.
});

It should be the instrument key from when it was set in the instrument manager. 
 
Cc: zkoch@chromium.org
This looks work as intended in Chrome since we present payment app instead of instruments. Payment app can decide which instrument to use or ask user to choose one.

Comment 2 by ma...@chromium.org, Aug 7 2017

If the payment app supports two payment methods (bobpay, alicepay), but the merchant only supports one (alicepay), the payment app should be able to know which payment method it should start. Perhaps |instrumentKey| should be |instrumentKeys|, an array of the matching instruments from which the payment app could choose?
That's already included in PaymentRequestEvent.methodData (https://w3c.github.io/payment-handler/#dom-paymentrequestevent)

Comment 4 by ma...@chromium.org, Aug 10 2017

Cc: rouslan@chromium.org
We should remove instrumentKey from the spec and implementation if it's not going to be used.
Firefox is planning to use the instrumentKey, because they plan to present all instruments. (Mathieu, if this answers your question, please close this bug report as WontFix - working at intended.)

Comment 6 by ma...@chromium.org, Aug 14 2017

Is there an asymmetry in the implementations? If I am writing a Payment Handler with two instruments in it ("A" and "B"), is it the case that during payment Chrome will call my payment handler without |instrumentKey| set to either "A" or "B," whereas Firefox will set it appropriately? 
I believe you're correct. You would need to check for the instrumentKey parameter in your payment handler code.

Comment 8 by ma...@chromium.org, Aug 14 2017

An asymmetry will probably create instability in the various payment handler implementations that are out there. 

The spec draft currently says "The instrumentKey identifier will be passed to the payment handler to indicate the PaymentInstrument selected by the user." Should we bring this up to the WG to change the language to "may be passed"?

Comment 9 by zkoch@chromium.org, Aug 14 2017

"may" language probably makes sense. Rouslan, you're closest to this, so will defer to you.
Cc: jinho.b...@samsung.com
Owner: ma...@chromium.org
Sounds good. Please file an issue in https://github.com/w3c/payment-handler/issues/new.
Status: WontFix (was: Assigned)
Filed https://github.com/w3c/payment-handler/issues/212

Sounds like it's a WontFix for us, then

Sign in to add a comment