diff --git a/index.html b/index.html index ce78313..be4d5e3 100644 --- a/index.html +++ b/index.html @@ -33,7 +33,9 @@ previousMaturity: "FPWD", previousPublishDate: "2016-04-21", specStatus: "ED", - testSuiteURI: "https://w3c-test.org/payment-method-id/", + // We can only indirectly test conformance, so we rely on certain tests + // in the Payment Request API. + testSuiteURI: "https://w3c-test.org/payment-request/", wg: "Web Payments Working Group", wgPatentURI: "https://www.w3.org/2004/01/pp-impl/83744/status", wgURI: "https://www.w3.org/Payments/WG/", @@ -45,9 +47,10 @@
This specification defines payment method identifiers and how they are validated, and, where applicable, minted and formally registered with - the W3C. Other specifications (e.g., - Payment Request) make use of these - identifiers to facilitate monetary transactions on the web platform. + the W3C. Other specifications (e.g., the + Payment Request API) make use of + these identifiers to facilitate monetary transactions on the web + platform.
The steps to validate a payment method identifier with a string pmi are given by the following algorithm. It - returns either true or false. + returns true if the pmi is valid.
A URL-based payment method identifier is a URL that is valid as per the steps to + "!URL#concept-url">URL that is valid as per the steps to validate a URL-based payment method identifier.
- The steps to validate a URL-based - payment method identifier are given by the following algorithm. - The algorithm takes a url URL as input and returns true if the URL is - valid: + The steps to validate a URL-based payment method + identifier are given by the following algorithm. The algorithm + takes a URL url as + input and returns true if the URL is valid:
- const good = [ ++ const valid = [ { supportedMethods: "https://example.com/pay", }, @@ -162,7 +163,7 @@}, ]; - const bad = [ + const invalid = [ { // ❌ Uses http://, a username, and a password. supportedMethods: "http://username:password@example.com/pay", @@ -178,7 +179,7 @@
Comparison
-+
User agents MUST perform comparisons of URL-based payment method identifiers using equals. [[!URL]] @@ -202,7 +203,8 @@
A standardized payment method identifier is a string that represents a - standardized payment method. + standardized payment method and is valid as per the steps to + validate a standardized payment method identifier.
User agents MAY support zero or more standardized payment method @@ -245,17 +247,17 @@
-ignored by the user agent. Some user agents might inform developers that identifiers are invalid to help them fix issues.
- const good = [ ++ const valid = [ { supportedMethods: "basic-card", }, ]; - const bad = [ + const invalid = [ { // ❌ Contains Unicode character outside the valid ranges. - supportedMethods: "💳-card", + supportedMethods: "basic-💳", }, { // ❌ Contains uppercase characters. @@ -273,7 +275,7 @@
Comparison
-+
For standardized payment method identifiers, user agents MUST compare strings in a case-sensitive manner (code point for code @@ -285,6 +287,18 @@
Registry of standardized payment methods
+A standardized payment method is a payment method that has undergone standardization at the W3C, and is listed in this registry.