|
120 | 120 | before proceeding along the W3C Recommendation track.
|
121 | 121 | p>
|
122 | 122 | <ul>
|
123 |
| - <li> |
124 |
| - <a data-lt= |
125 |
| - "PaymentCurrencyAmount.currencySystem">currencySystema> (see |
126 |
| - <a href="https://github.com/w3c/payment-request/issues/617">issue |
127 |
| - 617a>). |
128 |
| - li> |
129 | 123 | <li data-link-for="PaymentItem">
|
130 | 124 | <a>PaymentItema>'s <a>typea> member and the
|
131 | 125 | <a>PaymentItemTypea> enum (see <a href=
|
|
1407 | 1401 | dictionary PaymentCurrencyAmount {
|
1408 | 1402 | required DOMString currency;
|
1409 | 1403 | required DOMString value;
|
1410 |
| - // Note: currencySystem is "at risk" of being removed! |
1411 |
| - DOMString currencySystem = "urn:iso:std:iso:4217"; |
1412 | 1404 | };
|
1413 | 1405 | pre>
|
1414 | 1406 | <p>
|
1415 | 1407 | A <a>PaymentCurrencyAmounta> dictionary is used to supply monetary
|
1416 | 1408 | amounts.
|
1417 | 1409 | p>
|
1418 |
| - <div class="issue atrisk"> |
1419 |
| - <p> |
1420 |
| - This feature has been marked "<a>at riska>". If you'd like for this |
1421 |
| - feature to remain in the specification, please describe your use case |
1422 |
| - in <a href="https://github.com/w3c/payment-request/issues/490">issue |
1423 |
| - 490a>. |
1424 |
| - p> |
1425 |
| - <dl> |
1426 |
| - <dt> |
1427 |
| - <dfn>currencySystemdfn> member |
1428 |
| - dt> |
1429 |
| - <dd> |
1430 |
| - A URL that indicates the currency system that the <a>currencya> |
1431 |
| - identifier belongs to. By default, the value is |
1432 |
| - "<code>urn:iso:std:iso:4217code>" indicating that <a>currencya> |
1433 |
| - is defined by [[!ISO4217]] (for example, <code>USDcode> for US |
1434 |
| - Dollars). |
1435 |
| - dd> |
1436 |
| - dl> |
1437 |
| - div> |
1438 | 1410 | <dl>
|
1439 | 1411 | <dt>
|
1440 | 1412 | <dfn>currencydfn> member
|
1441 | 1413 | dt>
|
1442 | 1414 | <dd>
|
1443 | 1415 | <p>
|
1444 |
| - A string containing a currency identifier. The value of |
1445 |
| - <a>currencya> can be any string that is valid within the currency |
1446 |
| - system indicated by <a>currencySystema>. |
1447 |
| - p> |
1448 |
| - <p> |
1449 |
| - When using [[!ISO4217]], all <a data-cite= |
| 1416 | + A [[!ISO4217]] <a data-cite= |
1450 | 1417 | "!ecma-402#sec-iswellformedcurrencycode">well-formeda> 3-letter
|
1451 |
| - alphabetic codes are allowed (i.e., the numeric codes are not |
1452 |
| - supported). Their canonical form is upper case. However, the set of |
1453 |
| - combinations of currency code for which localized currency symbols |
1454 |
| - are available is implementation dependent. Where a localized |
1455 |
| - currency symbol is not available, a user agent SHOULD use U+00A4 |
1456 |
| - (¤) for formatting. User agents MAY format the display of the |
1457 |
| - <a>currencya> member to adhere to OS conventions (e.g., for |
1458 |
| - localization purposes). |
| 1418 | + alphabetic code (i.e., the numeric codes are not supported). Their |
| 1419 | + canonical form is upper case. However, the set of combinations of |
| 1420 | + currency code for which localized currency symbols are available is |
| 1421 | + implementation dependent. Where a localized currency symbol is not |
| 1422 | + available, a user agent SHOULD use U+00A4 (¤) for formatting. User |
| 1423 | + agents MAY format the display of the <a>currencya> member to |
| 1424 | + adhere to OS conventions (e.g., for localization purposes). |
1459 | 1425 | p>
|
| 1426 | + <div class="note" title= |
| 1427 | + "Digital currencies and ISO 4217 currency codes"> |
| 1428 | + <p> |
| 1429 | + User agents implementing this specification enforce [[ISO4217]]'s |
| 1430 | + 3-letter codes format via ECMAScript’s <a data-cite= |
| 1431 | + "!ecma-402#sec-iswellformedcurrencycode">isWellFormedCurrencyCodea> |
| 1432 | + abstract operation, which is invoked as part of the <a>check and |
| 1433 | + canonicalize amounta> algorithm. When a code does not adhere to |
| 1434 | + the [[ISO4217]] defined format, a <a>RangeErrora> is thrown. |
| 1435 | + p> |
| 1436 | + <p> |
| 1437 | + Current implementations will therefore allow the use of |
| 1438 | + well-formed currency codes that are not part of the official |
| 1439 | + [[ISO4217]] list (e.g., XBT, XRP, etc.). If the provided code is |
| 1440 | + a currency that the browser knows how to display, then an |
| 1441 | + implementation will generally display the appropriate currency |
| 1442 | + symbol in the user interface (e.g., "USD" is shown as "$", "GBP" |
| 1443 | + is "£", and the non-standard "XBT" could be shown as "Ƀ"). When a |
| 1444 | + code cannot be matched, the specification recommends browsers |
| 1445 | + show a scarab "¤". |
| 1446 | + p> |
| 1447 | + <p> |
| 1448 | + Efforts are underway at ISO to account for digital currencies, |
| 1449 | + which may result in an update to the [[ISO4217]] registry or an |
| 1450 | + entirely new registry. The community expects this will resolve |
| 1451 | + ambiguities that have crept in through the use of non-standard |
| 1452 | + 3-letter codes; for example, does "BTC" refer to Bitcoin or to a |
| 1453 | + future Bhutan currency? At the time of publication, it remains |
| 1454 | + unclear what form this evolution will take, or even the time |
| 1455 | + frame in which the work will be completed. The W3C Web Payments |
| 1456 | + Working Group is liaising with ISO so that, in the future, |
| 1457 | + revisions to this specification remain compatible with relevant |
| 1458 | + ISO registries. |
| 1459 | + p> |
| 1460 | + div> |
1460 | 1461 | dd>
|
1461 | 1462 | <dt>
|
1462 | 1463 | <dfn>valuedfn> member
|
|
1506 | 1507 | steps:
|
1507 | 1508 | p>
|
1508 | 1509 | <ol data-link-for="PaymentCurrencyAmount">
|
1509 |
| - <li data-tests= |
1510 |
| - "PaymentCurrencyAmount/currencySystem-member.https.html">If |
1511 |
| - <var>amountvar>.<a>currencySystema> is not |
1512 |
| - "<code>urn:iso:std:iso:4217code>", throw a <a>TypeErrora>. |
1513 |
| - li> |
1514 | 1510 | <li>Let <var>isValidCurrencyvar> be the result of calling
|
1515 | 1511 | <a data-cite=
|
1516 | 1512 | "!ecma-402#sec-iswellformedcurrencycode">IsWellFormedCurrencyCodea>
|
|
1536 | 1532 | steps:
|
1537 | 1533 | p>
|
1538 | 1534 | <ol data-link-for="PaymentCurrencyAmount">
|
1539 |
| - <li>If <var>totalvar>.<a>currencySystema> is not |
1540 |
| - "<code>urn:iso:std:iso:4217code>", terminate this algorithm. |
1541 |
| - li> |
1542 | 1535 | <li>
|
1543 | 1536 | <a>Check and canonicalize amounta> <var>amountvar>. Rethrow any
|
1544 | 1537 | exceptions.
|
|
0 commit comments