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

By separating the `options` and `details` of the PaymentRequest PR #133 would allow for this to be easily solved and an issue marker has been included to reflect this.

The solution is simply to allow an `amount` for each PaymentMethod (in exactly the same format as the amount specified in `details.amount`).

A sample `details` object might look like:

```javascript
{
  "amount" : [{
    "currency" : "USD",
    "value" : "55.00"}],
  "supportedMethods" : [
    {
      "identifers" : ["visa", "mastercard"],
      "data" : {}
    },
    {
      "identifers" : ["bobpay.com"],
      "data" : {
        "merchantIdentifier" : "XXXX",
        "bobPaySpecificField" : true
      },
      "amount" : [{
        "currency" : "USD",
        "value" : "55.00"}],
      },
    {
      "identifiers" : ["bitcoin"],
      "data" : {
        "address" : "XXXX"
      }
      "amount" : [{
        "currency" : "XBT",
        "value" : "0.000123"}],
      },
    }
  }
```

---
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-207913477

Received on Sunday, 10 April 2016 04:02:33 UTC