Skip to content

Commit

Permalink
Separate total from line items.
Browse files Browse the repository at this point in the history
Fixes #18.
  • Loading branch information
adrianba committed Apr 28, 2016
1 parent 5bcadcc commit 9ef1dd2
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions specs/paymentrequest.html
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,8 @@ <h2>CurrencyAmount</h2>
<h2>PaymentDetails dictionary</h2>
<pre class="idl">
dictionary PaymentDetails {
sequence&lt;PaymentItem&gt; items;
PaymentItem total;
sequence&lt;PaymentItem&gt; displayItems;
sequence&lt;ShippingOption&gt; shippingOptions;
};
</pre>
Expand All @@ -654,13 +655,18 @@ <h2>PaymentDetails dictionary</h2>
The following fields are part of the <code>PaymentDetails</code> dictionary:
</p>
<dl>
<dt><code>items</code></dt>
<dt><code>total</code></dt>
<dd>
This sequence of <a><code>PaymentItem</code></a> dictionaries indicates what the payment
request is for. The sequence must contain at least one <code>PaymentItem</code>. The last
<code>PaymentItem</code> in the sequence represents the total amount of the payment
request. The <a>user agent</a> MAY validate that the total amount is the sum of the
preceding items, but it is the responsibility of the calling code to ensure that.
This <a><code>PaymentItem</code></a> contains the total amount of the payment request.
</dd>
<dt><code>displayItems</code></dt>
<dd>
This sequence of <a><code>PaymentItem</code></a> dictionaries contains line items
for the payment request that the user agent MAY display. For example, it might include
details of products or breakdown of tax and shipping. It is optional to provide this
information.
<p>The <a>user agent</a> MAY validate that the <code>total</code> amount is the
sum of these items, but it is the responsibility of the calling code to ensure that.</p>
</dd>
<dt><code>shippingOptions</code></dt>
<dd>
Expand Down

0 comments on commit 9ef1dd2

Please sign in to comment.