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

过时
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

过时 supportedTypes 特性为 BasicCardRequest dictionary can optionally be provided to specify an array of DOMString s representing the card types that the retailer supports (e.g. credit , debit , prepaid ).

This property is obsolete and should no longer be used. Instead of making the web app or site worry about this, the onus has been transferred to the payment processor.

句法

basicCardRequest.supportedTypes = [cardType1...cardTypeN];
					

An array containing one or more DOMString s, which describe the card types the retailer supports. Legal values are defined in BasicCardType enum, and are currently:

  • credit
  • debit
  • prepaid

范例

The following example shows a sample definition of the first parameter of the PaymentRequest() 构造函数, data property of which contains supportedNetworks and supportedTypes 特性。

var supportedInstruments = [{
  supportedMethods: 'basic-card',
  data: {
    supportedNetworks: ['visa', 'mastercard', 'amex', 'jcb',
                        'diners', 'discover', 'mir', 'unionpay'],
    supportedTypes: ['credit', 'debit']
  }
}];
var details = { ... };
var options = { ... };
var request = new PaymentRequest(supportedInstruments, details, options);
					

浏览器兼容性

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
supportedTypes 弃用 Chrome 不支持 No Edge 不支持 ≤18 — 79 Firefox 不支持 56 — 65 注意事项 Disabled
56 — 65 注意事项 Disabled
It's now up to the payment processor to determine the type of card used, when necessary. Available only in nightly builds.
Disabled ). To change preferences in Firefox, visit about:config.
IE 不支持 No Opera 不支持 No Safari ? WebView Android 不支持 No Chrome Android 57 Firefox Android 不支持 56 — 65 注意事项 Disabled
56 — 65 注意事项 Disabled
It's now up to the payment processor to determine the type of card used, when necessary. Available only in nightly builds.
Disabled ). To change preferences in Firefox, visit about:config.
Opera Android 不支持 No Safari iOS ? Samsung Internet Android 7.0

图例

完整支持

完整支持

不支持

不支持

兼容性未知 ?

兼容性未知

弃用。不要用于新网站。

弃用。不要用于新网站。

见实现注意事项。

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

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

元数据

  • 最后修改: