Re: [w3c/webpayments-payment-apps-api] Revisiting payment app filtering (#96)

> can you give an example of a question that the browser cannot answer with data it has, but can be answered by executing code?

The browser is not able to answer questions regarding the contents of the `data` fields in [PaymentMethodData](https://w3c.github.io/browser-payment-api/#paymentmethoddata-dictionary) and [PaymentDetailsModifier](https://w3c.github.io/browser-payment-api/#paymentdetailsmodifier-dictionary) dictionaries. The structure of the contents of these fields are proprietary, and only known by the payee (the merchant) and the payment provider (the one that owns the payment app).

An example of what the contents of the data field might be, can be found in the [Basic Card Payment specification](https://w3c.github.io/webpayments-methods-card/#request). Here, information about the supported networks ("visa", "amex",  "mastercard", etc) and the type of card ("credit", "debit", etc) is supplied in the `data` field.

Is the `canHandle()` mechanism an absolute and fundamental requirement that we can't do without? As I've said above, I'm not a great fan of this, and I feel that it shouldn't be necessary for the merchant to ask this question, as long as he can supply a fallback option in the form of a recommended payment app to ensure that the user isn't presented with a dead end in the payment request UI.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webpayments-payment-apps-api/issues/96#issuecomment-275053747

Received on Wednesday, 25 January 2017 09:02:12 UTC