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

I think I'm in favor of this proposal, @adrianhopebailie, but want to clarify a few things before being a +1 on it. I'll also try to make assertions rather than ask questions in an attempt to get to an understanding more quickly. You are asserting that a payment request will:

1. Be composed of a set (array) of one or more acceptable payment methods.
2. Associate payment method-specific data with each item in the array.
3. Allow an array for the payment methods associated with each item in the array (I feel a bit uneasy about this one, haven't thought it through but it feels like it could add UI complications - like if you specify a payment method twice in the set of acceptable payment methods and the prices are different, you'll have to expose that difference to the customer).

I am asserting that, in addition to the two items above, a payment request will:

1. Use whatever glossary term we decide on, in the singular form, for what you note as "methods" above (I thought we had decided on scheme?). So, "method" instead of "methods". As a general rule, we will use the singular, even for properties with associated arrays.
2. Not shove everything in a "data" property, but allow the key-value pairs to live at the same level as "method" above. 

To provide a more accurate picture of what I'm talking about, here's an example below:

```javascript
var paymentRequest = {
  acceptablePaymentMethod: [{
    paymentMethod: ["VisaLegacy", "DiscoverLegacy", "MastercardLegacy"],
    requestedPayment: {
      amount: '54.18',
      currency: 'USD'
    },
    propertyFoo: 1,
    propertyBar: "XYZ",
    ...
  }, { ... }
  ]
};
```


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

Received on Wednesday, 3 February 2016 01:25:13 UTC