w3c / payment-request

Payment Request API
https://www.w3.org/TR/payment-request/
Other
489 stars 135 forks source link

Documentation error? 55 + 5 = 65 #622

Closed edent closed 7 years ago

edent commented 7 years ago

"2.2 The details argument" shows

        displayItems: [
          {
            label: "Sub-total",
            amount: { currency: "USD", value: "55.00" },
          },
          {
            label: "Sales Tax",
            amount: { currency: "USD", value: "5.00" },
          },
        ],
        total: {
          label: "Total due",
          amount: { currency: "USD", value: "65.00" },

https://github.com/w3c/payment-request/blob/gh-pages/index.html#L288

If my mathematic reasoning is correct, 55+5=60. Or have I misunderstood what the code is trying to say?

marcoscaceres commented 7 years ago

Just realized the $5 comes from the selected shipping option. But it was wrong not to have a comment not explaining that.