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

MerchantValidationEvent() 构造函数创建新 MerchantValidationEvent object. You should not have to create these events yourself; instead, just handle the merchantvalidation 事件。

句法

merchantValidationEvent = new MerchantValidationEvent(type, options);
					

参数

type
DOMString which must be merchantvalidation , the only type of event which uses the MerchantValidationEvent 接口。
选项 可选

An optional 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.
validationURL 可选

The URL from which to retrieve payment handler specific verification information used to validate the merchant. This is an empty string by default.

返回值

A newly-created MerchantValidationEvent providing the information that needs to be delivered to the client-side code to present to the 用户代理 通过调用 complete() .

异常

TypeError
The string specified as validationURL could not be parsed as a URL.
RangeError
指定 methodName does not correspond to a known and supported merchant or is not a well-formed standard payment method identifier.

规范

规范 状态 注释
支付请求 API
The definition of 'MerchantValidationEvent()' 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
MerchantValidationEvent() 构造函数 Chrome 不支持 No Edge 不支持 No Firefox 64 注意事项
64 注意事项
Available only in Nightly builds.
IE 不支持 No Opera 不支持 No Safari ? WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 64 注意事项
64 注意事项
Available only in Nightly builds.
Opera Android 不支持 No Safari iOS ? Samsung Internet Android 不支持 No

图例

完整支持

完整支持

不支持

不支持

兼容性未知 ?

兼容性未知

见实现注意事项。

另请参阅

元数据

  • 最后修改: