安全上下文
此特征只可用于 安全上下文 (HTTPS),在某些或所有 支持浏览器 .

PaymentMethodChangeEvent 接口在 支付请求 API describes the paymentmethodchange event which is fired by some payment handlers when the user switches payment instruments (e.g., a user selects a "store" card to make a purchase while using Apple Pay).

构造函数

PaymentMethodChangeEvent()
创建并返回新 PaymentMethodChangeEvent object, optionally initialized with values taken from a given PaymentMethodChangeEventInit 字典。

特性

In addition to the properties below, this interface includes properties inherited from PaymentRequestUpdateEvent .

methodDetails 只读 安全上下文
An object containing payment method-specific data useful when handling a payment method change. If no such information is available, this value is null .
methodName 只读 安全上下文
DOMString containing the payment method identifier, a string which uniquely identifies a particular payment method. This identifier is usually a URL used during the payment process, but may be a standardized non-URL string as well, such as basic-card . The default value is the empty string, "" .

方法

This interface includes methods inherited from PaymentRequestUpdateEvent .

规范

规范 状态 注释
支付请求 API
The definition of 'PaymentMethodChangeEvent' in that specification.
候选推荐 初始定义。

浏览器兼容性

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
PaymentMethodChangeEvent Chrome 不支持 No Edge 不支持 No Firefox 63 注意事项 Disabled
63 注意事项 Disabled
Available only in nightly builds.
Disabled From version 63: this feature is behind the dom.payments.request.enabled preference (needs to be set to true ) 和 dom.payments.request.supportedRegions preference (needs to be set to A comma-delineated list of one or more 2-character ISO country codes indicating the countries in which to support payments (for example, US,CA . ). To change preferences in Firefox, visit about:config.
IE 不支持 No Opera 不支持 No Safari ? WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 63 注意事项 Disabled
63 注意事项 Disabled
Available only in nightly builds.
Disabled From version 63: this feature is behind the dom.payments.request.enabled preference (needs to be set to true ) 和 dom.payments.request.supportedRegions preference (needs to be set to A comma-delineated list of one or more 2-character ISO country codes indicating the countries in which to support payments (for example, US,CA . ). To change preferences in Firefox, visit about:config.
Opera Android 不支持 No Safari iOS ? Samsung Internet Android 不支持 No
methodDetails Chrome 不支持 No Edge 不支持 No Firefox 63 注意事项 Disabled
63 注意事项 Disabled
Available only in nightly builds.
Disabled ). To change preferences in Firefox, visit about:config.
IE 不支持 No Opera 不支持 No Safari ? WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 63 注意事项 Disabled
63 注意事项 Disabled
Available only in nightly builds.
Disabled ). To change preferences in Firefox, visit about:config.
Opera Android 不支持 No Safari iOS ? Samsung Internet Android 不支持 No
methodName Chrome 不支持 No Edge 不支持 No Firefox 63 注意事项 Disabled
63 注意事项 Disabled
Available only in nightly builds.
Disabled ). To change preferences in Firefox, visit about:config.
IE 不支持 No Opera 不支持 No Safari ? WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 63 注意事项 Disabled
63 注意事项 Disabled
Available only in nightly builds.
Disabled ). To change preferences in Firefox, visit about:config.
Opera Android 不支持 No Safari iOS ? Samsung Internet Android 不支持 No

图例

完整支持

完整支持

不支持

不支持

兼容性未知 ?

兼容性未知

见实现注意事项。

用户必须明确启用此特征。

用户必须明确启用此特征。

元数据

  • 最后修改:
  1. 支付请求 API
  2. PaymentMethodChangeEvent
  3. 特性
    1. methodDetails
    2. methodName
  4. 继承:
    1. PaymentRequestUpdateEvent
    2. 事件
  5. Related pages for Payment Request API
    1. HTMLIFrameElement.allowPaymentRequest
    2. MerchantValidationEvent
    3. PaymentAddress
    4. PaymentRequest
    5. PaymentRequestUpdateEvent
    6. PaymentResponse

版权所有  © 2014-2026 乐数软件    

工业和信息化部: 粤ICP备14079481号-1