- From: Rouslan Solomakhin <notifications@github.com>
- Date: Tue, 05 Dec 2017 06:48:22 -0800
- To: w3c/payment-request <payment-request@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 5 December 2017 14:49:05 UTC
Perhaps the ideal non-breaking change is adding 'tax`, `shipping`, and `subtotal` elements to `PaymentDetails`, similar to `total`.
```javascript
const paymentRequest = new PaymentRequest(
[{supportedMethods: 'basic-card'}],
{
subtotal: {
label: 'Sub Total',
amount: {
currency: 'USD',
value: '6.00',
},
},
shipping: {
label: 'Shipping',
amount: {
currency: 'USD',
value: '3.00',
},
},
tax: {
label: 'Tax',
amount: {
currency: 'USD',
value: '1.00',
},
},
total: {
label: 'Total',
amount: {
currency: 'USD',
value: '10.00',
},
},
displayItems: aVeryLongListHere,
});
```
--
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/payment-request/issues/163#issuecomment-349325858
Received on Tuesday, 5 December 2017 14:49:05 UTC