diff --git a/index.html b/index.html index 156fc1e0..5cb47c8c 100644 --- a/index.html +++ b/index.html @@ -399,10 +399,19 @@
details.total.amount.value
is U+002D HYPHEN-MINUS, then throw a
TypeError
. total
MUST be a non-negative amount.
+ methodData
+ or details.modififiers
sequences, then throw a TypeError
.
+ PaymentMethodData
in methodData
, if the data
field
is supplied but is not a JSON-serializable object, then throw a TypeError
.
PaymentDetailsModifier
in details.modifiers
, if the total
field
+ is supplied and the first character of total.amount.value
is U+002D HYPHEN-MINUS, then throw a
+ TypeError
. total
MUST be a non-negative amount.
+ PaymentRequest
.methodData
into request@[[\methodData]].
@@ -686,6 +695,7 @@ modifiers
PaymentDetailsModifier
dictionaries contains modifiers
+ for particular payment method identifiers. For example, it allows you to adjust the total
+ amount based on payment method.
+ + dictionary PaymentDetailsModifier { + required sequence<DOMString> supportedMethods; + PaymentItem total; + sequence<PaymentItem> additionalDisplayItems; + }; ++ +
+ The PaymentDetailsModifier
dictionary provides details that modify the
+ PaymentDetails
based on payment method identifier. It contains the
+ following fields:
+
supportedMethods
supportedMethods
field contains a sequence of payment method identifiers.
+ The remaining fields in the PaymentDetailsModifier
apply only if the user selects
+ a payment method included in this sequence.
+ total
PaymentItem
value overrides the total
field in the
+ PaymentDetails
dictionary for the payment method identifiers
+ in the supportedMethods
field.
+ additionalDisplayItems
PaymentItem
dictionaries provides additional display
+ items that are appended to the displayItems
field in the PaymentDetails
+ dictionary for the payment method identifiers in the supportedMethods
+ field. This field is commonly used to add a discount or surcharge line item indicating the
+ reason for the different total
amount for the selected payment method
+ that the user agent MAY display.
+
+ The user agent MAY validate that the total
amount is the sum of the displayItems
+ and the additionalDisplayItems
, but it is the responsibility of the calling code to ensure that.
+
totalAmount
amount
value from the PaymentItem
representing
+ the payment request total. This will either be the total.amount
value from
+ the PaymentDetails
dictionary for the payment request or it will
+ be the total.amount
value from a PaymentDetailsModifier
+ matching the payment method identifier for the payment method that the user selected
+ to fulfil the transaction.
+ details
details
contains a displayItems
value, then copy
this value to the displayItems
field of target@[[\details]].
details
contains a modifiers
value, then copy
+ this value to the modifiers
field of target@[[\details]].
+ details
contains a shippingOptions
sequence, then:
methodName
attribute value of response to the payment method identifier
for the payment method that the user selected to accept the payment.
total.amount
value from request@[[\details]].
+ PaymentDetailsModifier
modifier in the modifiers
sequence
+ in request@[[\details]] that matches the payment method identifier for the
+ payment method that the user selected to accept the payment, then let amount
+ be the total.amount
value from modifier.
+ totalAmount
attribute value of response to amount.
+ details
attribute value of response to a JSON-serializable object
containing the payment method specific message used by the merchant to process