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

I think it makes sense to allow `items` to be optionally present in the payment-method specific data. What do you think?
````JavaScript
var paymentRequest = new PaymentRequest(
    ["foo", "visa"],
    {"items": [{
        "id": "total",
        "label": "Total amount",
        "amount": {"currencyCode": "USD", "value": "1.00"}
    }]},
    {"requestShipping": false},
    {"foo": {
        "bar": "baz",
        "items": [{
            "id": "original",
            "label": "Original price",
            "amount": {"currencyCode": "USD", "value": "1.00"}
        }, {
            "id": "foodiscount",
            "label": "Foo payment method discount",
            "amount": {"currencyCode": "USD", "value": "-0.30"}
        }, {
            "id": "total",
            "label": "Total amount",
            "amount": {"currencyCode": "USD", "value": "0.70"}
        }]
    }});
````

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

Received on Wednesday, 23 March 2016 21:59:40 UTC