W3C home > Mailing lists > Public > public-payments-wg@w3.org > February 2016

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

From: Dave Longley <notifications@github.com>
Date: Tue, 02 Feb 2016 21:35:17 -0800
To: w3c/webpayments <webpayments@noreply.github.com>
Message-ID: <w3c/webpayments/issues/77/179023013@github.com>
As payment methods may each have their own special data, I recommend we simply enumerate them each individually, even if that means repeating prices (note that they may often not be the same price anyway). I don't think that will be difficult for payees to generate and it will be less ambiguous. So I was thinking something more like this:

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

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webpayments/issues/77#issuecomment-179023013
Received on Wednesday, 3 February 2016 05:35:49 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:43:14 UTC