Intent to remove: currencySystem in PaymentRequest API

35 views
Skip to the first unread message

Jinho Bang

unread,
21 May 2018, 12:27:4721/05/2018
to blink-dev

Primary eng (and PM) emails

jinho...@samsung.com


Summary

The `currencySystem` member was removed from PaymentRequest API spec. Removal at this time

does not preclude it being added to a future version of the API. Implementations of Payment Request

API allow the use of well-formed currency codes that are not part of the official ISO4217 registry. If the

provided code is a currency that the browser knows how to display, then an implementation will

generally display the appropriate currency symbol in the user interface.


Motivation

Required validation of currency code[1]


Before this change, implementations allowed the use of any string that are not part of the ISO 4217 if

web developer uses custom currency system.


After this change, implementations only allows well-formed 3-letter alphabetic code[2].


[1] https://github.com/w3c/payment-request/issues/490

[2] https://tc39.github.io/ecma402/#sec-iswellformedcurrencycode


Interoperability and Compatibility Risk

The compatibility risk is very low in Chrome. I added a use counter but it's been never used until now.

The interoperability is also very low for the following reasons.

 - WPWG face-to-face meeting(Apr 2018) discussed the situation. Ripple, Facebook, Google, Airbnb,

   Mastercard, Mozilla, and JCB expressed support for removing the feature and there were no

   objections.

 - Sent CfC(Call for Consensus) to WPWG public mailing list but there were no additional

   objections[1][2].


[1] https://lists.w3.org/Archives/Public/public-payments-wg/2018Apr/0020.html

[2] https://lists.w3.org/Archives/Public/public-payments-wg/2018May/0001.html


Edge: No public signal

Firefox: Supported, positive to removal

Safari: No public signal

Web Developers: Positive to removal


Alternative implementation suggestion for web developers

Unnecessary


Usage information from UseCounter

https://www.chromestatus.com/metrics/feature/timeline/popularity/2435


Entry on the feature dashboard

https://www.chromestatus.com/feature/4887385041010688


Requesting approval to remove too?

Yes

Daniel Bratell

unread,
22 May 2018, 03:54:5522/05/2018
to blink-dev, Jinho Bang
I'm slightly confused by your request but if I understand it correctly, you are planning to remove "currencySystem" whose intended use was to make it possible to validate other data and it wasn't even used for that so it has no purpose at all.

LGTM1 to remove currencySystem.

/Daniel
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/17b5ad68-f34b-43ac-95ad-19b8c3e7a3d9%40chromium.org.



--
/* Opera Software, Linköping, Sweden: CEST (UTC+2) */

Philip Jägenstedt

unread,
22 May 2018, 04:27:4422/05/2018
to Daniel Bratell, blink-dev, Jinho Bang
Yep, from cs.chromium.org it looks like the only thing this dictionary member does it to cause an exception to be thrown in various situations. LGTM2 to remove.

Sent https://github.com/w3c/web-platform-tests/pull/11099 to remove remnants from web-platform-tests. It would be great to have an historical tests which Firefox would fail until they also remove it. I tried a bit but gave up, some invocation of the PaymentRequest constructor with { currency: 'SEK', value: '1', get currencySystem() { assert_unreached('bla bla') } } should work...

Mike West

unread,
22 May 2018, 08:41:4622/05/2018
to Philip Jägenstedt, Daniel Bratell, blink-dev, jinho...@samsung.com
Reply all
Reply to author
Forward
0 new messages