|
1375 | 1375 | "payment-request/payment-request-canmakepayment-method-protection.https.html">
|
1376 | 1376 | Optionally, at the <a>top-level browsing contexta>'s discretion,
|
1377 | 1377 | return <a>a promise rejected witha> a "<a>NotAllowedErrora>" <a>
|
1378 |
| - DOMExceptiona>. |
1379 |
| - <p class="note" data-link-for="PaymentRequest"> |
1380 |
| - This allows user agents to apply heuristics to detect and prevent |
1381 |
| - abuse of the <a>canMakePayment()a> method for fingerprinting |
1382 |
| - purposes, such as creating <a>PaymentRequesta> objects with a |
1383 |
| - variety of supported <a>payment methodsa> and calling |
1384 |
| - <a>canMakePayment()a> on them one after the other. For example, |
1385 |
| - a user agent may restrict the number of successful calls that can |
1386 |
| - be made based on the <a>top-level browsing contexta> or the |
1387 |
| - time period in which those calls were made. |
1388 |
| - p> |
| 1378 | + DOMExceptiona>. As described in section <a href= |
| 1379 | + "#canmakepayment-protections">a>, the user agent may limit the |
| 1380 | + rate at which a page can call <a>canMakePayment()a>. |
1389 | 1381 | li>
|
1390 | 1382 | <li>Let <var>hasHandlerPromisevar> be <a>a new promisea>.
|
1391 | 1383 | li>
|
|
5191 | 5183 | ol>
|
5192 | 5184 | section>
|
5193 | 5185 | section>
|
5194 |
| - <section class="informative"> |
| 5186 | + <section id="privacy"> |
5195 | 5187 | <h2>
|
5196 | 5188 | Privacy and Security Considerations
|
5197 | 5189 | h2>
|
|
5271 | 5263 | <a>payment method identifiera>.
|
5272 | 5264 | p>
|
5273 | 5265 | section>
|
5274 |
| - section> |
5275 |
| - <section id="privacy"> |
5276 |
| - <h2> |
5277 |
| - Privacy Considerations |
5278 |
| - h2> |
5279 | 5266 | <section>
|
5280 | 5267 | <h2>
|
5281 | 5268 | Exposing user information
|
|
5301 | 5288 | consent.
|
5302 | 5289 | p>
|
5303 | 5290 | section>
|
5304 |
| - <section> |
5305 |
| - <h2> |
5306 |
| - canMakePayment() protections |
| 5291 | + <section class="informative"> |
| 5292 | + <h2 id="canmakepayment-protections"> |
| 5293 | + <code>canMakePayment()code> protections |
5307 | 5294 | h2>
|
5308 | 5295 | <p data-link-for="PaymentRequest">
|
5309 |
| - The <a>canMakePayment()a> method enables the payee to call |
5310 |
| - <a>show()a> if the user is ready to take advantage of the API, or |
5311 |
| - to fall back to a legacy checkout experience if not. Because this |
5312 |
| - method shares some information with the payee, user agents are |
5313 |
| - expected to protect the user from abuse of the method, for example, |
5314 |
| - by restricting the number or frequency of calls. |
| 5296 | + The <a>canMakePayment()a> method enables the payee to determine — |
| 5297 | + before calling <a>show()a> — whether the user agent knows of any |
| 5298 | + <a>payment handlersa> available to the user that support the |
| 5299 | + <a>payment methodsa> provided to the <a>PaymentRequesta> |
| 5300 | + <a data-lt="PaymentRequest.PaymentRequest()">constructora>. If no |
| 5301 | + <a>payment handlersa> support the <a>payment methodsa>, this |
| 5302 | + enables the payee to fall back to a legacy checkout experience. |
| 5303 | + Because this method shares some potentially unique information with |
| 5304 | + the payee, user agents are expected to protect the user from abuse of |
| 5305 | + the method. For example, user agents can reduce user fingerprinting |
| 5306 | + by: |
| 5307 | + p> |
| 5308 | + <ul data-link-for="PaymentRequest"> |
| 5309 | + <li>Allowing the user to configure the user agent to turn off |
| 5310 | + <a>canMakePayment()a>, which would return <a>a promise rejected |
| 5311 | + witha> a "<a>NotAllowedErrora>" <a>DOMExceptiona>. |
| 5312 | + li> |
| 5313 | + <li>Rate-limiting the frequency of calls to <a>canMakePayment()a> |
| 5314 | + with different parameters. |
| 5315 | + li> |
| 5316 | + ul> |
| 5317 | + <p> |
| 5318 | + For rate-limiting the user agent might look at repeated calls from: |
| 5319 | + p> |
| 5320 | + <ul> |
| 5321 | + <li>the same effective top-level domain plus one (eTLD+1). |
| 5322 | + li> |
| 5323 | + <li>the top-level browsing context. Alternatively, the user agent may |
| 5324 | + block access to the API entirely for origins know to be bad actors. |
| 5325 | + li> |
| 5326 | + <li>the origin of an <a>iframea> or popup window. |
| 5327 | + li> |
| 5328 | + ul> |
| 5329 | + <p> |
| 5330 | + These rate-limiting techniques intend to increase the cost associated |
| 5331 | + with repeated calls, whether it is the cost of managing multiple |
| 5332 | + eTLDs or the user experience friction of opening multiple windows |
| 5333 | + (tabs or pop-ups). |
5315 | 5334 | p>
|
5316 | 5335 | section>
|
5317 | 5336 | section>
|
|
0 commit comments