|
3 | 3 | <head>
|
4 | 4 | <meta charset='utf-8'>
|
5 | 5 | <title>
|
6 |
| - Payment Request API 1.1 |
| 6 | + Payment Request API |
7 | 7 | </title>
|
8 | 8 | <script src='https://www.w3.org/Tools/respec/respec-w3c' class=
|
9 | 9 | 'remove'></script>
|
10 | 10 | <script class='remove'>
|
11 | 11 | var respecConfig = {
|
12 |
| - shortName: "payment-request-1.1", |
| 12 | + shortName: "payment-request", |
13 | 13 | github: "w3c/payment-request",
|
14 | 14 | specStatus: "ED",
|
15 | 15 | group: "payments",
|
|
74 | 74 | },
|
75 | 75 | doJsonLd: true,
|
76 | 76 | xref: "web-platform",
|
77 |
| - mdn: "payment-request", |
| 77 | + mdn: true, |
78 | 78 | };
|
79 | 79 | </script>
|
80 | 80 | </head>
|
81 | 81 | <body data-cite="payment-method-id">
|
82 | 82 | <h1 id="title">
|
83 |
| - Payment Request API 1.1 |
| 83 | + Payment Request API |
84 | 84 | </h1>
|
85 | 85 | <section id='abstract'>
|
86 | 86 | <p>
|
@@ -143,13 +143,36 @@ <h3>
|
143 | 143 | Changes since last publication
|
144 | 144 | </h3>
|
145 | 145 | <p>
|
146 |
| - This version of the specification removes data features from the API, |
147 |
| - essentially pushing data details to payment method descriptions. The |
148 |
| - complete list of changes, including all editorial changes, is |
149 |
| - viewable in the <a href= |
150 |
| - "https://github.com/w3c/payment-request/commits/gh-pages">commit |
151 |
| - history</a>. Key set of changes are viewable in the <a href= |
152 |
| - "#changelog">Changelog</a>. |
| 146 | + In September 2022 the Web Payments Working Group published a <a href= |
| 147 | + "https://www.w3.org/TR/2022/REC-payment-request-20220908/">Payment |
| 148 | + Request Recommendation</a>. Following privacy and |
| 149 | + internationalization reviews, the Recommendation excluded <a href= |
| 150 | + "https://lists.w3.org/Archives/Public/public-payments-wg/2021Jun/0000.html"> |
| 151 | + capabilities</a> related to billing and shipping addresses. However, |
| 152 | + implementations have continued to support those features |
| 153 | + interoperably, and so the Working Group has decided to try to |
| 154 | + re-align the specification with implementations, and re-engage the |
| 155 | + community on associated issues. |
| 156 | + </p> |
| 157 | + <p> |
| 158 | + This document is a Candidate Recommendation Snapshot based on the |
| 159 | + text of the original Recommendation. A subsequent Candidate |
| 160 | + Recommendation Draft will add back address capabilities and a small |
| 161 | + number of other changes made since publication of the Recommendation. |
| 162 | + </p> |
| 163 | + <p> |
| 164 | + In adding back support for addresses, the group plans to refer to the |
| 165 | + address components defined in the <a href= |
| 166 | + "https://w3c.github.io/contact-picker/">Contact Picker API</a> rather |
| 167 | + than define those components itself. Indeed, the Contact Picker API |
| 168 | + is derived from the original definitions found in Payment Request |
| 169 | + API, and pulled out of the specification because addresses are useful |
| 170 | + on the Web beyond payments. |
| 171 | + </p> |
| 172 | + <p> |
| 173 | + The Working Group would engage in discussion and follow the usual |
| 174 | + review process before advancing the specification to Proposed |
| 175 | + Recommendation status. |
153 | 176 | </p>
|
154 | 177 | </section>
|
155 | 178 | </section>
|
|
419 | 442 | <pre class="example js" title="Constructing a `PaymentRequest`">
|
420 | 443 | async function doPaymentRequest() {
|
421 | 444 | try {
|
422 |
| - const request = new PaymentRequest(methodData, details, options); |
| 445 | + const request = new PaymentRequest(methodData, details); |
423 | 446 | const response = await request.show();
|
424 | 447 | await validateResponse(response);
|
425 | 448 | } catch (err) {
|
|
459 | 482 | </p>
|
460 | 483 | <pre class="example js" title="POSTing with `fetch()`">
|
461 | 484 | async function doPaymentRequest() {
|
462 |
| - const payRequest = new PaymentRequest(methodData, details, options); |
| 485 | + const payRequest = new PaymentRequest(methodData, details); |
463 | 486 | const payResponse = await payRequest.show();
|
464 | 487 | let result = "";
|
465 | 488 | try {
|
@@ -823,21 +846,15 @@ <h2>
|
823 | 846 | <li data-tests=
|
824 | 847 | "payment-request-show-method.https.html, show-method-postmessage-manual.https.html">
|
825 | 848 | If the [=relevant global object=] of [=request=] does not have
|
826 |
| - [=transient activation=], the user agent MAY: |
| 849 | + [=transient activation=]: |
827 | 850 | <ol>
|
828 | 851 | <li>Return [=a promise rejected with=] with a {{"SecurityError"}}
|
829 | 852 | {{DOMException}}.
|
830 | 853 | </li>
|
831 | 854 | </ol>
|
832 |
| - <p class="note"> |
833 |
| - This allows the user agent to not require user activation, for |
834 |
| - example to support redirect flows where a user activation may not |
835 |
| - be present upon redirect. See <a href= |
836 |
| - "#user-activation-requirement"></a> for security considerations. |
837 |
| - </p> |
838 | 855 | </li>
|
839 |
| - <li data-tests="show-consume-activation.https.html">Otherwise, |
840 |
| - [=consume user activation=] of the [=relevant global object=]. |
| 856 | + <li data-tests="show-consume-activation.https.html">[=Consume user |
| 857 | + activation=] of the [=relevant global object=]. |
841 | 858 | </li>
|
842 | 859 | <li>Let |document| be |request|'s [=relevant global object=]'s
|
843 | 860 | [=associated `Document`=].
|
@@ -3283,32 +3300,6 @@ <h2 id="canmakepayment-protections">
|
3283 | 3300 | opening multiple windows (tabs or pop-ups).
|
3284 | 3301 | </p>
|
3285 | 3302 | </section>
|
3286 |
| - <section> |
3287 |
| - <h2 id="user-activation-requirement"> |
3288 |
| - User activation requirement |
3289 |
| - </h2> |
3290 |
| - <p> |
3291 |
| - If the user agent does not require user activation as part of the |
3292 |
| - {{PaymentRequest/show()}} method, some additional security |
3293 |
| - mitigations should be considered. Not requiring user activation |
3294 |
| - increases the risk of spam and click-jacking attacks, by allowing a |
3295 |
| - Payment Request UI to be initiated without the user interacting with |
3296 |
| - the page immediately beforehand. |
3297 |
| - </p> |
3298 |
| - <p> |
3299 |
| - In order to mitigate spam, the user agent may decide to enforce a |
3300 |
| - user activation requirement after some threshold, for example after |
3301 |
| - the user has already been shown a Payment Request UI without a user |
3302 |
| - activation on the current page. In order to mitigate click-jacking |
3303 |
| - attacks, the user agent may implement a time threshold in which |
3304 |
| - clicks are ignored immediately after a dialog is shown. |
3305 |
| - </p> |
3306 |
| - <p> |
3307 |
| - Another relevant mitigation exists in step 6 of |
3308 |
| - {{PaymentRequest/show()}}, where the document must be visible in |
3309 |
| - order to initiate the user interaction. |
3310 |
| - </p> |
3311 |
| - </section> |
3312 | 3303 | </section>
|
3313 | 3304 | <section class="informative">
|
3314 | 3305 | <h2>
|
|
0 commit comments