安全上下文
此特征只可用于
安全上下文
(HTTPS),在某些或所有
支持浏览器
.
这是
实验性技术
检查
浏览器兼容性表格
要小心谨慎在生产中使用这之前。
supportedNetworks
特性为
BasicCardRequest
dictionary contains an array of
DOMString
s representing the card networks that the retailer supports (e.g.
amex
,
mastercard
).
supportedNetworks : [value [, ... value]]
An array containing one or more
DOMString
s, which describe the card networks the retailer supports. Legal values are defined in the W3C's document
Card Network Identifiers Approved for use with Payment Request API
, and are currently:
amex
cartebancaire
diners
discover
jcb
mastercard
mir
unionpay
visa
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);
| 规范 | 状态 | 注释 |
|---|---|---|
|
Basic Card Payment
The definition of 'supportedNetworks' in that specification. |
工作草案 | 初始定义。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
supportedNetworks
|
Chrome 不支持 No | Edge 不支持 ≤18 — 79 |
Firefox
56
注意事项
Disabled
|
IE 不支持 No | Opera 不支持 No | Safari ? | WebView Android 不支持 No | Chrome Android 57 |
Firefox Android
56
注意事项
Disabled
|
Opera Android 不支持 No | Safari iOS ? | Samsung Internet Android 7.0 |
完整支持
不支持
兼容性未知
见实现注意事项。
用户必须明确启用此特征。
BasicCardRequest
supportedNetworks
supportedTypes