@@ -360,13 +360,13 @@ The sample code for authenticating the user follows. Note that the example code
360
360
presumes access to await/async, for easier to read promise handling.
361
361
362
362
<pre class="example" id="authentication-example" highlight="js">
363
- /* isSecurePaymentConfirmationAvailable indicates whether the browser */
363
+ /* securePaymentConfirmationAvailability indicates whether the browser */
364
364
/* supports SPC. It does not indicate whether the user has a credential */
365
365
/* ready to go on this device. */
366
366
const spcAvailable =
367
367
PaymentRequest &&
368
- PaymentRequest.isSecurePaymentConfirmationAvailable &&
369
- (await PaymentRequest.isSecurePaymentConfirmationAvailable ()) === 'available' ;
368
+ PaymentRequest.securePaymentConfirmationAvailability &&
369
+ (await PaymentRequest.securePaymentConfirmationAvailability ()) === 'available' ;
370
370
if (!spcAvailable) {
371
371
/* Browser does not support SPC; merchant should fallback to traditional flows. */
372
372
}
@@ -659,7 +659,7 @@ A static API is added to {{PaymentRequest}} in order to provide developers a
659
659
simplified method of checking whether Secure Payment Confirmation is available.
660
660
661
661
<xmp class="idl">
662
- enum IsSecurePaymentConfirmationAvailableResult {
662
+ enum SecurePaymentConfirmationAvailability {
663
663
"available",
664
664
"unavailable-unknown-reason",
665
665
"unavailable-feature-not-enabled",
@@ -668,16 +668,16 @@ enum IsSecurePaymentConfirmationAvailableResult {
668
668
};
669
669
670
670
partial interface PaymentRequest {
671
- static Promise<IsSecurePaymentConfirmationAvailableResult> isSecurePaymentConfirmationAvailable ();
671
+ static Promise<SecurePaymentConfirmationAvailability> securePaymentConfirmationAvailability ();
672
672
};
673
673
</xmp>
674
674
<dl dfn-type="attribute" dfn-for="PaymentRequest">
675
- : {{PaymentRequest/isSecurePaymentConfirmationAvailable ()}}
675
+ : {{PaymentRequest/securePaymentConfirmationAvailability ()}}
676
676
:: Upon invocation, a promise is returned that resolves with one of the
677
- members of {{IsSecurePaymentConfirmationAvailableResult }} , based on the
677
+ members of {{SecurePaymentConfirmationAvailability }} , based on the
678
678
current availability of the Secure Payment Confirmation feature.
679
679
</dl>
680
- <dl dfn-type="enum-value" dfn-for="IsSecurePaymentConfirmationAvailableResult ">
680
+ <dl dfn-type="enum-value" dfn-for="SecurePaymentConfirmationAvailability ">
681
681
: <dfn>available</dfn>
682
682
:: Indicates that the user agent believes that the Secure Payment
683
683
Confirmation API is available in the calling frame.
@@ -712,11 +712,11 @@ initiate a SPC flow:
712
712
<pre class="example" id="available-example" highlight="js">
713
713
const spcAvailable =
714
714
PaymentRequest &&
715
- PaymentRequest.isSecurePaymentConfirmationAvailable &&
716
- await PaymentRequest.isSecurePaymentConfirmationAvailable () === 'available' ;
715
+ PaymentRequest.securePaymentConfirmationAvailability &&
716
+ await PaymentRequest.securePaymentConfirmationAvailability () === 'available' ;
717
717
</pre>
718
718
719
- NOTE: The use of the static {{PaymentRequest/isSecurePaymentConfirmationAvailable }} method is recommended for
719
+ NOTE: The use of the static {{PaymentRequest/securePaymentConfirmationAvailability }} method is recommended for
720
720
SPC feature detection, instead of calling {{PaymentRequest/canMakePayment}} on an already-constructed
721
721
PaymentRequest object.
722
722
@@ -1588,15 +1588,15 @@ they are strong, cross-site identifiers. However in order to obtain them from
1588
1588
the [=Relying Party=] , the merchant already needs an as-strong identifier to
1589
1589
give to the [=Relying Party=] (e.g., the credit card number).
1590
1590
1591
- ## Fingerprinting via isSecurePaymentConfirmationAvailable ## {#sctn-fingerprinting-via-is-secure-payment-confirmation-available}
1591
+ ## Fingerprinting via securePaymentConfirmationAvailability ## {#sctn-fingerprinting-via-is-secure-payment-confirmation-available}
1592
1592
1593
- The {{isSecurePaymentConfirmationAvailable }} API presents a possible
1593
+ The {{securePaymentConfirmationAvailability }} API presents a possible
1594
1594
fingerprinting risk, as it can silently return specific reasons that the
1595
1595
Secure Payment Confirmation API is not available for a specific frame. These
1596
1596
reasons are not believed to leak significant information, but should be
1597
1597
considered:
1598
1598
1599
- - {{IsSecurePaymentConfirmationAvailableResult /unavailable-feature-not-enabled}} :
1599
+ - {{SecurePaymentConfirmationAvailability /unavailable-feature-not-enabled}} :
1600
1600
some risk of fingerprinting, depending on under what circumstances the user
1601
1601
agent considers Secure Payment Confirmation to be available or not. User
1602
1602
agents are encouraged to make Secure Payment Confirmation available to all
@@ -1605,18 +1605,18 @@ considered:
1605
1605
example, a user agent may ship Secure Payment Confirmation to all users on
1606
1606
a given OS but not others - this then reduces the fingerprinting risk to
1607
1607
no more than the user agent string already reveals.
1608
- - {{IsSecurePaymentConfirmationAvailableResult /unavailable-no-permission-policy}} :
1608
+ - {{SecurePaymentConfirmationAvailability /unavailable-no-permission-policy}} :
1609
1609
no (additional) fingerprinting risk, as the "[=payment permission
1610
1610
string|payment=] " permission policy is already silently detectable by
1611
1611
attempting to construct a {{PaymentRequest}} object (construction will throw
1612
1612
an error if the permission policy is not enabled).
1613
- - {{IsSecurePaymentConfirmationAvailableResult /unavailable-no-user-verifying-platform-authenticator}} :
1613
+ - {{SecurePaymentConfirmationAvailability /unavailable-no-user-verifying-platform-authenticator}} :
1614
1614
no (additional) fingerprinting risk over the existing
1615
1615
{{PublicKeyCredential/isUserVerifyingPlatformAuthenticatorAvailable}} API.
1616
1616
1617
1617
In addition to the above considerations, this specification allows a user agent
1618
1618
to choose to return
1619
- {{IsSecurePaymentConfirmationAvailableResult /unavailable-unknown-reason}} even
1619
+ {{SecurePaymentConfirmationAvailability /unavailable-unknown-reason}} even
1620
1620
when a specific reason is known, should it wish to in order to preserve user
1621
1621
privacy. This might be done in the case, e.g., that a user agent has detected
1622
1622
that the current frame has already accessed other APIs that pose a
0 commit comments