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: Adrian Hope-Bailie <notifications@github.com>
Date: Wed, 03 Feb 2016 04:10:38 -0800
To: w3c/webpayments <webpayments@noreply.github.com>
Message-ID: <w3c/webpayments/issues/77/179190518@github.com>
@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

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