Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate total from line items. #158

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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