From c37921bcf85b82c1dcc021d11c05a7bc735d2de6 Mon Sep 17 00:00:00 2001
From: Marcos Caceres
@@ -91,33 +91,6 @@
- Payment Request API 1.1
+ Payment Request API
- The W3C published - Payment Request API 1.0 as a Proposed Recommendation in September - 2021. Since then, W3C has been working to resolve two Formal Objections - from W3C Members; see the Team Report for - details. At this time, a Council is evaluating the Formal Objections to - determine whether Payment Request API 1.0 should advance to - Recommendation or be returned to the Working Group for changes. -
-- In the meantime, the Editors have continued to update this - specification with new features (see change log below). To provide - devellopers and implementers with more confidence about these features, - the working group has decided to formally publish the a new W3C Working - Draft. This will also provide the group with a foundation for potential - discussion at TPAC about the future of Payment Request. -
-- It is not uncommon for a Working Group to work on different revisions - of a specification simultaneously (e.g., see the CSS WG). With that in - mind, and because our current charter - anticipates enhancements to Payment Request 1.0, we've publish this 1.1 - draft. -
The working group maintains
@@ -569,10 +542,10 @@
|details|) constructor MUST act as follows:
- This allows the user agent to not require user activation, for - example to support redirect flows where a user activation may not - be present upon redirect. See for security considerations. -
Optionally, if the user agent wishes to disallow the call @@ -1419,8 +1380,8 @@
@@ -1772,8 +1733,8 @@
This specification defines a [=policy-controlled feature=] identified
- by the string "payment"
- [[permissions-policy]]. Its [=policy-controlled feature/default
- allowlist=] is 'self
'.
+ by the string "payment
" [[permissions-policy]]. Its
+ [=policy-controlled feature/default allowlist=] is 'self
'.
- If the user agent does not require user activation as part of the - {{PaymentRequest/show()}} method, some additional security - mitigations should be considered. Not requiring user activation - increases the risk of spam and click-jacking attacks, by allowing a - Payment Request UI to be initiated without the user interacting with - the page immediately beforehand. -
-- In order to mitigate spam, the user agent may decide to enforce a - user activation requirement after some threshold, for example after - the user has already been shown a Payment Request UI without a user - activation on the current page. In order to mitigate click-jacking - attacks, the user agent may implement a time threshold in which - clicks are ignored immediately after a dialog is shown. -
-- Another relevant mitigation exists in step 6 of - {{PaymentRequest/show()}}, where the document must be visible in - order to initiate the user interaction. -
-+ JSON-serialize runs JSON {{JSON/stringify()}}, passing the + supplied object as the sole argument, and returns the resulting + string. This can throw an exception. +
This specification defines a [=policy-controlled feature=] identified
- by the string "payment
" [[permissions-policy]]. Its
+ by the string "payment"
+ [[permissions-policy]]. Its
[=policy-controlled feature/default allowlist=] is 'self
'.
- To JSON-serialize - a value, [=serialize a JavaScript value to a JSON string=] given - that value. This can throw an exception. -
From 0ad4f66e781fd91290af27a83f8fff6c38aaf0bc Mon Sep 17 00:00:00 2001 From: Marcos Caceres
Optionally, if the user agent wishes to disallow the call
From ed9e46d212c81d48249d0448747381f5b5863a3a Mon Sep 17 00:00:00 2001
From: Marcos Caceres
Optionally, if the user agent wishes to disallow the call
From 648669bf134a7420040e89bb49046dfaf30560b7 Mon Sep 17 00:00:00 2001
From: ianbjacobs
|request|.{{PaymentRequest/[[response]]}} if |isRetry| is true, or a
new {{PaymentResponse}} otherwise.
self
'.
+ allowlist=] is [=default allowlist/'self'=].
From 26078ea549e3e6aff6bc31308cd893970a31cac3 Mon Sep 17 00:00:00 2001
From: Marcos Caceres
async function doPaymentRequest() {
try {
- const request = new PaymentRequest(methodData, details, options);
+ const request = new PaymentRequest(methodData, details);
const response = await request.show();
await validateResponse(response);
} catch (err) {
@@ -432,7 +432,7 @@
async function doPaymentRequest() { - const payRequest = new PaymentRequest(methodData, details, options); + const payRequest = new PaymentRequest(methodData, details); const payResponse = await payRequest.show(); let result = ""; try { From e48dfbe274ece5080ede260f221acdd313bd17f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20C=C3=A1ceres?=Date: Tue, 19 Mar 2024 08:08:49 +1100 Subject: [PATCH 13/16] Update index.html --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index a9e8c710..07927a7d 100644 --- a/index.html +++ b/index.html @@ -90,7 +90,7 @@ facilitate the payment flow between merchant and user. -
+ - async function doPaymentRequest() { - const payRequest = new PaymentRequest(methodData, details); + const payRequest = new PaymentRequest(methodData, details, options); const payResponse = await payRequest.show(); let result = ""; try { From 290154182d2f01742b9a3988e00d1f37ebd09c59 Mon Sep 17 00:00:00 2001 From: Marcos CaceresDate: Tue, 19 Mar 2024 08:18:11 +1100 Subject: [PATCH 15/16] remove options args from exqmples --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 96d77007..07927a7d 100644 --- a/index.html +++ b/index.html @@ -392,7 +392,7 @@
async function doPaymentRequest() { try { - const request = new PaymentRequest(methodData, details, options); + const request = new PaymentRequest(methodData, details); const response = await request.show(); await validateResponse(response); } catch (err) { @@ -432,7 +432,7 @@
async function doPaymentRequest() { - const payRequest = new PaymentRequest(methodData, details, options); + const payRequest = new PaymentRequest(methodData, details); const payResponse = await payRequest.show(); let result = ""; try { From eb4b9855019c7082f0f9952a64cfbcbbf96e7757 Mon Sep 17 00:00:00 2001 From: Marcos CaceresDate: Tue, 23 Apr 2024 08:55:22 +1000 Subject: [PATCH 16/16] Add sotd text --- index.html | 66 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 58 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index 07927a7d..69a0ad6a 100644 --- a/index.html +++ b/index.html @@ -90,7 +90,34 @@ facilitate the payment flow between merchant and user.
+ + + The W3C published + Payment Request API 1.0 as a Proposed Recommendation in September + 2021. Since then, W3C has been working to resolve two Formal Objections + from W3C Members; see the Team Report for + details. At this time, a Council is evaluating the Formal Objections to + determine whether Payment Request API 1.0 should advance to + Recommendation or be returned to the Working Group for changes. +
++ In the meantime, the Editors have continued to update this + specification with new features (see change log below). To provide + devellopers and implementers with more confidence about these features, + the working group has decided to formally publish the a new W3C Working + Draft. This will also provide the group with a foundation for potential + discussion at TPAC about the future of Payment Request. +
++ It is not uncommon for a Working Group to work on different revisions + of a specification simultaneously (e.g., see the CSS WG). With that in + mind, and because our current charter + anticipates enhancements to Payment Request 1.0, we've publish this 1.1 + draft. +
The working group maintains @@ -116,13 +143,36 @@
Changes since last publication
- This version of the specification removes data features from the API, - essentially pushing data details to payment method descriptions. The - complete list of changes, including all editorial changes, is - viewable in the commit - history. Key set of changes are viewable in the Changelog. + In September 2022 the Web Payments Working Group published a Payment + Request Recommendation. Following privacy and + internationalization reviews, the Recommendation excluded + capabilities related to billing and shipping addresses. However, + implementations have continued to support those features + interoperably, and so the Working Group has decided to try to + re-align the specification with implementations, and re-engage the + community on associated issues. +
++ This document is a Candidate Recommendation Snapshot based on the + text of the original Recommendation. A subsequent Candidate + Recommendation Draft will add back address capabilities and a small + number of other changes made since publication of the Recommendation. +
++ In adding back support for addresses, the group plans to refer to the + address components defined in the Contact Picker API rather + than define those components itself. Indeed, the Contact Picker API + is derived from the original definitions found in Payment Request + API, and pulled out of the specification because addresses are useful + on the Web beyond payments. +
++ The Working Group would engage in discussion and follow the usual + review process before advancing the specification to Proposed + Recommendation status.