MerchantValidationEvent

Secure context
This feature is available only in secure contexts (HTTPS), in some or all supporting browsers .

MerchantValidationEvent interface of the the 支付请求 API enables a merchant to verify themselves as allowed to use a particular payment handler.

To learn more about merchant validation, see Merchant validation in Payment processing concepts .

构造函数

MerchantValidationEvent() Secure context
创建新的 MerchantValidationEvent object describing a merchantvalidation event that will be sent to the payment handler to request that it validate the merchant.

特性

MerchantValidationEvent.methodName Secure context
A DOMString providing a unique payment method identifier for the payment handler that's requiring validation. This may be either one of the standard payment method identifier strings or a URL that both identifies and handles requests for the payment handler, such as https://apple.com/apple-pay .
MerchantValidationEvent.validationURL Secure context
A USVString specifying a URL from which the site or app can fetch payment handler specific validation information. Once this data is retrieved, the data (or a promise resolving to the validation data) should be passed into complete() to validate that the payment request is coming from an authorized merchant.

方法

MerchantValidationEvent.complete() Secure context
Pass the data retrieved from the URL specified by validationURL into complete() to complete the validation process for the PaymentRequest .

规范

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

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile
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
注意事项 Disabled
64
注意事项 Disabled
Available only in Nightly builds.
Disabled From version 64: this feature is behind the 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 64
注意事项 Disabled
64
注意事项 Disabled
Available only in Nightly builds.
Disabled From version 64: this feature is behind the 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
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
complete() Chrome 不支持 No Edge 不支持 No Firefox 64
注意事项
64
注意事项
Available only in Nightly builds.
IE 不支持 No Opera 不支持 No Safari 不支持 No WebView Android 不支持 No Chrome Android 不支持 No Firefox Android 64
注意事项
64
注意事项
Available only in Nightly builds.
Opera Android 不支持 No Safari iOS ? Samsung Internet Android 不支持 No
methodName 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
validationURL 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

图例

完整支持
完整支持
不支持
不支持
兼容性未知
兼容性未知
见实现注意事项。
用户必须明确启用此特征。
用户必须明确启用此特征。