Checkout initialization
The checkout drop-in component initializer provides options for configuring language definitions and extending the default models with new fields and transformers.
Configuration options
The checkout component initializer accepts the following configuration options:
Example
The following code shows an example implementation of the checkout initializer configuration:
Set language definitions
The langDefinitions
property is used to fetch and register dictionary files for the checkout component. This allows you to provide localized text for different languages in your application.
Set models
You can extend the default models in the checkout component and provide transformers to process new fields.
The models
property is an object that contains the default models that you might want to extend and the transformers to use to transform the data. By default, the checkout componen initializer accepts the following models only:
CartModel
CustomerModel
OrderModel
The following example shows how to extend the default models with new fields and transformers: