From 31a0a8e5759c9b24a9de21bb4494301d50e49526 Mon Sep 17 00:00:00 2001
From: Adrian Hope-Bailie
@@ -587,19 +587,20 @@ PaymentRequest constructor
{
"id": "basket",
"label": "Sub-total",
- "amount": { "currencyCode": "USD", "value" : "55.00" }, // US$55.00
+ "amount": { "currency": "USD", "amount" : "55.00" }, // US$55.00
},
{
"id": "tax",
"label": "Sales Tax",
- "amount": { "currencyCode": "USD", "value" : "5.00" }, // US$5.00
+ "amount": { "currency": "USD", "amount" : "5.00" }, // US$5.00
},
{
"id": "total",
"label": "Total due",
- "amount": { "currencyCode": "USD", "value" : "60.00" }, // US$60.00
+ "amount": { "currency": "USD", "amount" : "60.00" }, // US$60.00
}
]
}
@@ -578,8 +578,8 @@ Internal Slots
CurrencyAmount
dictionary CurrencyAmount {
- required DOMString currencyCode;
- required DOMString value;
+ required DOMString currency;
+ required DOMString amount;
};
CurrencyAmount
The following fields MUST be supplied for a CurrencyAmount
to be valid:
currencyCode
currency
currencyCode
is a string containing a three-letter alphabetic code for the
- currency as defined by [[!ISO4217]]. For example, "USD"
for US Dollars.
+ currency
is a string containing a currency identifier. The most common
+ identifiers are three-letter alphabetic codes as defined by [[!ISO4217]] (for example,
+ "USD"
for US Dollars) however any string is considered valid and
+ user agents MUST not attempt to validate this string.
value
amount
^-?[0-9]+(\.[0-9]+)?$
.
+ The string should match the regular expression ^[0-9]+(\.[0-9]+)?$
.
The following example shows how to represent US$55.00.
{ - "currencyCode": "USD", - "value" : "55.00" + "currency": "USD", + "amount" : "55.00" }From 98ee708ffeda53806c3edaa6cec0b6814cdcd8a0 Mon Sep 17 00:00:00 2001 From: Adrian Hope-Bailie
dictionary CurrencyAmount { required DOMString currency; - required DOMString amount; + required DOMString value; };
@@ -594,7 +594,7 @@
"USD"
for US Dollars) however any string is considered valid and
user agents MUST not attempt to validate this string.
- amount
value
{ "currency": "USD", - "amount" : "55.00" + "value" : "55.00" }