From f8d1f77e23b56583547208a9146ad9cae9d1e308 Mon Sep 17 00:00:00 2001 From: Ade Bateman Date: Wed, 27 Apr 2016 10:50:11 -0700 Subject: [PATCH] Separate total from line items. Fixes #18. --- specs/paymentrequest.html | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/specs/paymentrequest.html b/specs/paymentrequest.html index 32f625a6..df9c3bb7 100644 --- a/specs/paymentrequest.html +++ b/specs/paymentrequest.html @@ -640,7 +640,8 @@

CurrencyAmount

PaymentDetails dictionary

 dictionary PaymentDetails {
-  sequence<PaymentItem> items;
+  PaymentItem total;
+  sequence<PaymentItem> displayItems;
   sequence<ShippingOption> shippingOptions;
 };
       
@@ -654,13 +655,18 @@

PaymentDetails dictionary

The following fields are part of the PaymentDetails dictionary:

-
items
+
total
- This sequence of PaymentItem dictionaries indicates what the payment - request is for. The sequence must contain at least one PaymentItem. The last - PaymentItem in the sequence represents the total amount of the payment - request. The user agent 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 PaymentItem contains the total amount of the payment request. +
+
displayItems
+
+ This sequence of PaymentItem 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. +

The user agent MAY validate that the total amount is the + sum of these items, but it is the responsibility of the calling code to ensure that.

shippingOptions