Re: [w3c/payment-request] Pass SKU instead of Total (#879)

I hadn't made the connection that this is actually requesting the handler to provide payment details.

That's an interesting use case. Does it relate to https://github.com/w3c/payment-handler/issues/337 in that case?

If so it seems like we could think about solving this more abstractly, i.e. let payment handlers specify any of the details they are able to provide.

Something like (building on the example from @rsolomakhin):

```
registration.paymentManager.capabilities.set(
    ['requestShipping', 'requestPayerEmail', 'setTotal'])
  .then(handleDoneSettingCapabilities)
  .catch(handleError);
```

This would imply some additional matching criteria for Payment Handlers, i.e. if the PaymentRequest is created without a total, then only handlers that can `setTotal` should be options.

I realise this doesn't allow the website to know the total until the PaymentRequest is invoked (`.show()`) but that seems preferable from a privacy perspective.

-- 
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-request/issues/879#issuecomment-528455870

Received on Thursday, 5 September 2019 16:44:54 UTC