PaymentDetailsBase

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

PaymentDetailsBase dictionary is a mixin used by the PaymentDetailsInit and PaymentDetailsUpdate dictionaries. It is never directly used by developers and is included here only to be used as the basis for those documents.

特性

displayItems 可选
An array of PaymentItem objects, each describing one line item for the payment request. These represent the line items on a receipt or invoice.
modifiers 可选
An array of PaymentDetailsModifier objects, each describing a modifier for particular payment method identifiers. For example, you can use one to adjust the total payment amount based on the selected payment method ("5% cash discount!").
shippingOptions 可选
An array of PaymentShippingOption objects, each describing one available shipping option from which the user may choose.

Derived dictionaries

The following dictionaries include PaymentDetailsBase .

PaymentDetailsInit
Provides payment information when calling the PaymentRequest() 构造函数。
PaymentDetailsUpdate
Provides updated payment details while the payment user interface is being handled. This can be delivered to the payment interface using either PaymentDetailsUpdateEvent.updateWith() or by returning it from the optional detailsUpdate promise provided to the PaymentRequest.show() call that begins the user interaction.

规范

规范 状态 Comment
支付请求 API
The definition of 'PaymentDetailsBase' 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
PaymentDetailsBase Chrome 61 Edge ≤18 Firefox 55
注意事项 Disabled
55
注意事项 Disabled
Available only in nightly builds.
Disabled From version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true ) and 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 53 Firefox Android 55
注意事项 Disabled
55
注意事项 Disabled
Available only in nightly builds.
Disabled From version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true ) and 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 6.0
displayItems Chrome 61 Edge ≤18 Firefox 55
注意事项 Disabled
55
注意事项 Disabled
Available only in nightly builds.
Disabled From version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE 不支持 No Opera 不支持 No Safari ? WebView Android 不支持 No Chrome Android 60 Firefox Android 55
注意事项 Disabled
55
注意事项 Disabled
Available only in nightly builds.
Disabled From version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android 不支持 No Safari iOS ? Samsung Internet Android 8.0
modifiers Chrome 61 Edge ≤18 Firefox 55
注意事项 Disabled
55
注意事项 Disabled
Available only in nightly builds.
Disabled From version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE 不支持 No Opera 不支持 No Safari ? WebView Android 不支持 No Chrome Android 60 Firefox Android 55
注意事项 Disabled
55
注意事项 Disabled
Available only in nightly builds.
Disabled From version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android 不支持 No Safari iOS ? Samsung Internet Android 8.0
shippingOptions Chrome 61 Edge ≤18 Firefox 55
注意事项 Disabled
55
注意事项 Disabled
Available only in nightly builds.
Disabled From version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE 不支持 No Opera 不支持 No Safari ? WebView Android 不支持 No Chrome Android 60 Firefox Android 55
注意事项 Disabled
55
注意事项 Disabled
Available only in nightly builds.
Disabled From version 55: this feature is behind the dom.payments.request.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android 不支持 No Safari iOS ? Samsung Internet Android 8.0

图例

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