安全上下文
此特征只可用于
安全上下文
(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);
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
supportedTypes
弃用
|
Chrome 不支持 No | Edge 不支持 ≤18 — 79 |
Firefox
不支持
56 — 65
注意事项
Disabled
|
IE 不支持 No | Opera 不支持 No | Safari ? | WebView Android 不支持 No | Chrome Android 57 |
Firefox Android
不支持
56 — 65
注意事项
Disabled
|
Opera Android 不支持 No | Safari iOS ? | Samsung Internet Android 7.0 |
完整支持
不支持
兼容性未知
弃用。不要用于新网站。
见实现注意事项。
用户必须明确启用此特征。
BasicCardRequest
supportedNetworks
supportedTypes