Re: [w3c/browser-payment-api] Should it be possible to vary amounts depending on payment method (#4)

@msporny are you suggesting that we drop the `total` from the `PaymentDetails` object completely and move it to `PaymentMethodData`?

So the example in the spec becomes:

```javascript
var req = new PaymentRequest(
[
  {
    supportedMethods: ["visa","bitcoin"],
    total:  {
      label: "Total due",
      amount: { currency: "USD", value : "60.00" }, // US$60.00
    }
  },
  {
    supportedMethods: ["bobpay.com"],
    total:  {
      label: "Total due",
      amount: { currency: "USD", value : "59.00" }, // US$59.00
    },
    data: {
      merchantIdentifier: "XXXX",
      bobPaySpecificField: true
    }
  }
],
{
  displayItems: [
    {
      label: "Sub-total",
      amount: { currency: "USD", value : "55.00" }, // US$55.00
    },
    {
      label: "Sales Tax",
      amount: { currency: "USD", value : "5.00" }, // US$5.00
    }
  ]
},
{
  requestShipping: true
});

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/browser-payment-api/issues/4#issuecomment-222003519

Received on Thursday, 26 May 2016 21:43:42 UTC