Re: [w3c/payment-handler] Add userHint to PaymentManager (#206)

@rsolomakhin,

That's one way to do it, though `set` seems like it may be confusing or frustrating to use. For example, what happens here:

1. I call `set` with three KeyPaymentInstruments [A, B, C].
2. I call `set` with KeyPaymentInstruments [D].

What order is `D` in? First or last (or something else)? I assume we'd define it to be first or last -- but then if I want to do something else I have to fetch A, B, and C and insert them all at once along with D which is a bit messy, nevermind the potential race conditions.

An `insert` API could be used instead:

```webidl
interface PaymentInstruments {
  ...
  Promise<void>  insert(KeyPaymentInstrument details,
                        DOMString? instrumentKeyBefore);
};
```



-- 
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/pull/206#issuecomment-325024228

Received on Friday, 25 August 2017 20:15:22 UTC