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

MerchantValidationEvent 接口的 支付请求 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() 安全上下文
创建新的 MerchantValidationEvent object describing a merchantvalidation event that will be sent to the payment handler to request that it validate the merchant.

特性

MerchantValidationEvent.methodName 安全上下文
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 安全上下文
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() 安全上下文
Pass the data retrieved from the URL specified by validationURL into complete() to complete the validation process for the PaymentRequest .

规范

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

图例

完整支持

完整支持

不支持

不支持

兼容性未知 ?

兼容性未知

见实现注意事项。

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

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

元数据

  • 最后修改:
  1. 支付请求 API
  2. MerchantValidationEvent
  3. 构造函数
    1. MerchantValidationEvent()
  4. 特性
    1. methodName
    2. validationURL
  5. 方法
    1. complete()
  6. 继承:
    1. 事件
  7. Related pages for Payment Request API
    1. HTMLIFrameElement.allowPaymentRequest
    2. PaymentAddress
    3. PaymentMethodChangeEvent
    4. PaymentRequest
    5. PaymentRequestUpdateEvent
    6. PaymentResponse

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

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