Re: [w3c/payment-request] Should PaymentItems have a type? (#163)

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