[Payment Handler] instrumentKey does not appear to be set. |
||||
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.
,
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?
,
Aug 7 2017
That's already included in PaymentRequestEvent.methodData (https://w3c.github.io/payment-handler/#dom-paymentrequestevent)
,
Aug 10 2017
We should remove instrumentKey from the spec and implementation if it's not going to be used.
,
Aug 14 2017
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.)
,
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?
,
Aug 14 2017
I believe you're correct. You would need to check for the instrumentKey parameter in your payment handler code.
,
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"?
,
Aug 14 2017
"may" language probably makes sense. Rouslan, you're closest to this, so will defer to you.
,
Aug 14 2017
Sounds good. Please file an issue in https://github.com/w3c/payment-handler/issues/new.
,
Sep 5 2017
Filed https://github.com/w3c/payment-handler/issues/212 Sounds like it's a WontFix for us, then |
||||
►
Sign in to add a comment |
||||
Comment 1 by gogerald@chromium.org
, Aug 7 2017