Elements
Create an elements object
liquido.elements(options?)
This method creates an Elements instance, which manages a group of elements.
options object parameters
Parameter | Required | Type | Description |
---|---|---|---|
orderCredentials | String | Required to use with the Payment Element. the order credentials of PaymentOrder | |
locale | String | A locale to display placeholders and error strings in. Default is auto (Liquido detects the locale of the browser). | |
appearance | String | Match the design of your site with the appearance option. The layout of each Element stays consistent, but you can modify colors, fonts, borders, padding, and more. |
Update an elements object
This method updates options on an existing instance of Elements. Note that not all options (e.g. local) are updatable.
options object parameters
Parameter | Required | Type | Description |
---|---|---|---|
locale | String | A locale to display placeholders and error strings in. Default is auto (Liquido detects the locale of the browser). | |
appearance | String | Match the design of your site with the appearance option. The layout of each Element stays consistent, but you can modify colors, fonts, borders, padding, and more. |
Fetch elements update
elements.fetchUpdates()
Used with the Payment Element. This method fetches updates from the associated PaymentOrder on an existing instance of Elements, and reflects these updates in the Payment Element.
Returns:
This method returns a Promise which resolves with a result object. If this method succeeds, the result object will be empty. If this method fails, the result object will contain a localized error message in the error.message field. If the associated PaymentOrder is in an unexpected status, the result object will also contain the order's status in the error.status field.