[w3c/payment-handler] Remove "instrument" concept from PaymentManager (#371)

The `PaymentInstruments` [1] concept was originally designed to support multiple credit cards. It adds confusion to payment handlers that are not fundamentally about credit cards. Since Payment Request API is moving towards payment apps being the atomic building blocks instead of instruments, I think it will be more clear to change payment handler registration interface to something like this:

```
registration.paymentManager.setPaymentMethods([
    'https://bobpay.xyz/pay',
    'https://alicepay.com'
]);
```

Today many parts of `PaymentInstruments` are not used:

- Web-based payment handlers usually sets a single instrument with their supported payment methods
- Chrome always fetches the icon from the payment handler's web app manifest instead of using the ones provided in `PaymentInstruments.set()`
- `capabilities` only has well-defined meaning for `basic-card` payment method

With the proposed change to remove the `PaymentInstrument` concept, the web app manifest can become the authoritative source of information about the payment handler, such as name, icons, capabilities. This will also better unify just-in-time installation and explicit installation of payment handlers.

[1] https://w3c.github.io/payment-handler/#paymentinstruments-interface

-- 
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/371

Received on Friday, 8 May 2020 14:57:20 UTC