PaymentDetailsBase

Διαβάζετε την αγγλική έκδοση αυτού του περιεχομένου, καθώς δεν διατίθεται ακόμη σε αυτή τη γλώσσα. Βοηθήστε μας να μεταφράσουμε αυτό το άρθρο!

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

The 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.

Properties

displayItemsOptional
An array of PaymentItem objects, each describing one line item for the payment request. These represent the line items on a receipt or invoice.
modifiersOptional
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!").
shippingOptionsOptional
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() constructor.
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.

Specifications

Specification Status Comment
Payment Request API
The definition of 'PaymentDetailsBase' in that specification.
Candidate Recommendation Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
PaymentDetailsBaseChrome Full support 61Edge Full support YesFirefox Full support 55
Notes Disabled
Full support 55
Notes Disabled
Notes 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 support NoOpera No support NoSafari ? WebView Android No support NoChrome Android Full support 53Firefox Android Full support 55
Notes Disabled
Full support 55
Notes Disabled
Notes 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 support NoSafari iOS ? Samsung Internet Android Full support 6.0
displayItemsChrome Full support 61Edge Full support YesFirefox Full support 55
Notes Disabled
Full support 55
Notes Disabled
Notes 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 support NoOpera No support NoSafari ? WebView Android No support NoChrome Android Full support 60Firefox Android Full support 55
Notes Disabled
Full support 55
Notes Disabled
Notes 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 support NoSafari iOS ? Samsung Internet Android No support No
modifiersChrome Full support 61Edge Full support YesFirefox Full support 55
Notes Disabled
Full support 55
Notes Disabled
Notes 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 support NoOpera No support NoSafari ? WebView Android No support NoChrome Android Full support 60Firefox Android Full support 55
Notes Disabled
Full support 55
Notes Disabled
Notes 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 support NoSafari iOS ? Samsung Internet Android No support No
shippingOptionsChrome Full support 61Edge Full support YesFirefox Full support 55
Notes Disabled
Full support 55
Notes Disabled
Notes 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 support NoOpera No support NoSafari ? WebView Android No support NoChrome Android Full support 60Firefox Android Full support 55
Notes Disabled
Full support 55
Notes Disabled
Notes 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 support NoSafari iOS ? Samsung Internet Android No support No

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
See implementation notes.
See implementation notes.
User must explicitly enable this feature.
User must explicitly enable this feature.