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

@dlongley I'm not against this but worry that we will end up with a LOT of redundant data. I think we underestimate the number of payment methods that will evolve. Bare in mind that there may be 10 ways to do a "card payment" - clear PAN, tokenised, encrypted etc. - and each is a different payment method.

Perhaps a better way to do this is to have a root that defines the payment request data and then the methods can override this;

```js
var paymentRequest = {
  transfer: {
    amount: '60.00',
    currency: 'USD'
  },
  acceptablePayment: [{
    paymentMethod: "VisaLegacy",
    transfer: {
      amount: '54.18',  //Discount for using VISA
      currency: 'USD'
    },
    specialVisaLegacyThing: 1,
    ...
  }, {
    paymentMethod: "MastercardLegacy",
    specialMastercardLegacyThing: 7
    ...
  }, {
    paymentMethod: "DiscoverLegacy",
    specialDiscoverLegacyThing: "foo",
    ...
  }, ...],
  ...
};
```


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

Received on Wednesday, 3 February 2016 12:11:09 UTC