w3c / payment-method-id

Payment Method Identifiers specification
https://w3c.github.io/payment-method-id/
Other
23 stars 20 forks source link

w3c.github.io/payment-method-id/ is not in parity with the tests #46

Closed mhahmadi closed 6 years ago

mhahmadi commented 6 years ago

https://w3c.github.io/payment-method-id/ mentions the following invalid method identifiers are all ignored by the user agent. Some user agents might inform developers that identifiers are invalid to help them fix issues. const invalid = [ { // ❌ Contains Unicode character outside the valid ranges. supportedMethods: "basic-💳", }, { // ❌ Contains uppercase characters. supportedMethods: "Basic-Card", }, { // ❌ Contains Unicode characters outside the valid ranges. supportedMethods: "¡basic-*-card!", }, ];

However the following test expects a RangeError to be thrown when such PMIs are encountered. https://w3c-test.org/payment-request/payment-request-ctor-pmi-handling.https.html

@marcoscaceres, which one is to be trusted?

marcoscaceres commented 6 years ago

Trust the tests. I'll update the spec tomorrow.

marcoscaceres commented 6 years ago

Actually, re-reading, I think I removed the "ignore invalid ones" already. Can you point me to the section where it says a user agent must ignore invalid PMIs? Did I miss it?

rsolomakhin commented 6 years ago

See the second note in https://w3c.github.io/payment-method-id/#validity-0

mhahmadi commented 6 years ago

screenshot

marcoscaceres commented 6 years ago

Thanks! Heh, I've been looking at specs for so long my brain automatically skips over non-normative notes 🙃

mhahmadi commented 6 years ago

Thank you for the quick turnaround Marcos.