[webpayments] PROPOSAL: Pass the list of supported payment methods and the method-specific data in a single object (#77)

>From the discussion at #37 

The payment request will contain (among other things)
 1. A set of supported payment methods
 1. Optional request data that is specific to one or more payment methods

An efficient way to pass this data in the payment request is to use an array of objects, each containing important request data and each indicating which payment method the data applies to.

An example would like this:
```javascript
[
  {
    "methods" : ["bobspay.com", "visa+tokenized", "visa+legacy", "mastercard"],
    "data" : {
      //Data in here is relevant if any of the above methods is used.
    }
  },
  {
    "methods" : ["bobspay.com"],
    "data" : {
      //Put some data in here that is relevant for bobspay.com payments only
    }
  },
  {
    "methods" : ["bitcoin"],
    "data" : {
      //Put some data in here that is relevant for bitcoin payments only (like the BTC price)
    }
  }
]
```

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webpayments/issues/77

Received on Monday, 1 February 2016 14:06:54 UTC