Re: [w3c/browser-payment-api] editorial: clarify that payment handler data is converted (#536)

> Usually it doesn't, I assume, so that's why it doesn't make sense to me to error on mismatch, because it seems like any time you have 2+ supportedMethods, you're always going to get at least one mismatch.

I can only assume this was done with the assumption that `.data` would be the same type for the array of `supportedMethods` - even if potentially false.  

Ideally, you then want: 

```JS
const methodData = [{
  supportedMethods: ["basic-card", "https://bank.com/basic-card"],
  data: { supportedTypes: "visa" }
}, {
  supportedMethods: ["crypto-currency", "https://bit.com/coin"],
  data: { cryptoCurrencyThing: "thing" }
}];
```

So you don't mix types. If you mix data types, this is going to all come crashing down. 


-- 
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/browser-payment-api/pull/536#issuecomment-303925696

Received on Thursday, 25 May 2017 05:25:29 UTC