[w3c/payment-handler] Drop PaymentInstrument in favor of MethodCapability (#302)

This was discussed at the 20 April Payment Handler breakout in Singapore. The suggestion was:

 * Because no browsers are currently planning to show instrument-level information, and
 * Because "instrument" suggests an instance of a payment method (e.g., an actual card) the name of the method+capability structure should be different.

@anthonyvd mentioned something like this:

<pre>
await  registration.paymentManager.setSupportedMethods([
  {
    method: "basic-card",
    capabilities: {
     supportedNetworks: ['visa'],
     supportedTypes: ['credit']
     }
 },
 {
    method: "https://bobpay.com/"
 }
]);
</pre>

The method/capability pair could be called, for example, MethodCapability. Similarly, change
PaymentInstruments to MethodCapabilities.

Note that since the current expectation is that payment handlers will do the capability matching (via the CanMakePaymentEvent) in the case of URL-based payment methods, there is no need to register capabilities for bobpay.


-- 
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/payment-handler/issues/302

Received on Tuesday, 8 May 2018 23:24:44 UTC