- From: Rouslan Solomakhin <notifications@github.com>
- Date: Fri, 02 Dec 2016 05:51:07 -0800
- To: w3c/webpayments-methods-card <webpayments-methods-card@noreply.github.com>
Received on Friday, 2 December 2016 13:52:14 UTC
I propose we update the basic-card spec like with this phrasing: > If `supportedMethods` contains `"basic-card"` and `data` is not in correct format, then user agent **MAY** throw `TypeError`. For PaymentRequest spec: > If `data` format does not match the specification of its `supportedMethods`, then user agent **MAY** throw `TypeError`. I'm using **MAY** instead of **MUST** because throwing works only for built-in payment methods, where user agent knows the format beforehand. Today that's `"basic-card"` and `"https://android.com/pay"` for Chrome, for example. However, when we have payment apps like `"https://samsung.com/pay"` or `"https://alipay.com"`, then the user agent will not know the right format of `data`, so it cannot throw in constructor. It can, however, reject the `show()` promise in that case. -- 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-methods-card/issues/20#issuecomment-264458016
Received on Friday, 2 December 2016 13:52:14 UTC