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

PaymentItem 字典用于 支付请求 API to describe a single line item on a payment request. This might be an item or service being purchased or a tax or other charge.

特性

amount 安全上下文
PaymentCurrencyAmount object describing the monetary value of the item.
label 安全上下文
A string specifying a human-readable name or description of the item or service being charged for. This may be displayed to the user by the 用户代理 , depending on the design of the interface.
pending 安全上下文
A Boolean value which is true if the specified amount has not yet been finalized. This can be used to show items such as shipping or tax amounts that depend upon the selection of shipping address, shipping option, or so forth. The user agent may show this information but is not required to do so.

规范

规范 状态 注释
支付请求 API
The definition of 'PaymentItem' 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
PaymentItem Chrome 61 Disabled
61 Disabled
Disabled ). To change preferences in Chrome, visit
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 ) 和 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 Disabled
53 Disabled
Disabled ). To change preferences in Chrome, visit
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 ) 和 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
amount Chrome 61 Disabled
61 Disabled
Disabled ). To change preferences in Chrome, visit
Edge ≤18 Firefox 55 IE 不支持 No Opera 不支持 No Safari ? WebView Android 不支持 No Chrome Android 53 Disabled
53 Disabled
Disabled ). To change preferences in Chrome, visit
Firefox Android 55 Opera Android 不支持 No Safari iOS ? Samsung Internet Android 不支持 No
label Chrome 61 Disabled
61 Disabled
Disabled ). To change preferences in Chrome, visit
Edge ≤18 Firefox 55 IE 不支持 No Opera 不支持 No Safari ? WebView Android 不支持 No Chrome Android 53 Disabled
53 Disabled
Disabled ). To change preferences in Chrome, visit
Firefox Android 55 Opera Android 不支持 No Safari iOS ? Samsung Internet Android 不支持 No
pending Chrome 61 Disabled
61 Disabled
Disabled ). To change preferences in Chrome, visit
Edge ≤18 Firefox 55 IE 不支持 No Opera 不支持 No Safari ? WebView Android 不支持 No Chrome Android 53 Disabled
53 Disabled
Disabled ). To change preferences in Chrome, visit
Firefox Android 55 Opera Android 不支持 No Safari iOS ? Samsung Internet Android 不支持 No

图例

完整支持

完整支持

不支持

不支持

兼容性未知 ?

兼容性未知

实验。期望将来行为有所改变。

实验。期望将来行为有所改变。

见实现注意事项。

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

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

另请参阅

元数据

  • 最后修改:
  1. 支付请求 API
  2. PaymentItem
  3. Related pages for Payment Request API
    1. HTMLIFrameElement.allowPaymentRequest
    2. MerchantValidationEvent
    3. PaymentAddress
    4. PaymentMethodChangeEvent
    5. PaymentRequest
    6. PaymentRequestUpdateEvent
    7. PaymentResponse

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

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