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

PaymentMethodChangeEvent() 构造函数创建新 PaymentMethodChangeEvent object providing details about a paymentmethodchange 事件。

句法

paymentMethodChangeEvent = new PaymentMethodChangeEvent(type, options);
					

参数

type
DOMString which must contain the string paymentmethodchange , the name of the only type of event which uses the PaymentMethodChangeEvent 接口。
选项 可选

An optional PaymentMethodChangeEventInit dictionary which may contain zero or more of the following properties:

methodName 可选
A DOMString containing the payment method identifier for the payment handler being used. This is an empty string by default.
methodDetails 可选
An object providing payment method-specific information describing the changes made to the payment, or null if there is no additional information available or required. This is null 在默认情况下。

返回值

A newly-created PaymentMethodChangeEvent object describing a change to the options specified for the payment method given in the methodName 特性。

The type of the methodDetails property depends on the payment method. For example, if methodName is basic-card , indicating that the basic card payment method is being used for validation, the methodDetails field must be a BasicCardChangeDetails 对象。

规范

规范 状态 注释
支付请求 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.

No compatibility data found. Please contribute data for "api.MerchantValidationEvent.PaymentMethodChangeEvent" (depth: 1) to the MDN 兼容性数据存储库 .

另请参阅

元数据

  • 最后修改: