Search.../

getConfig( )

Retrieves the configuration of your payment settings extension.

Description

Set your payment settings configuration in the return of the getConfig() function. Wix calls this function when you publish your site. Changes to the configuration don't take effect until you publish your site.

The only default currently available is to set a fallback value for whether to require 3 domain security to an order payment if the getPaymentSettings() function fails.

Where to find getConfig()

When you add the Payment Settings custom extension, a folder is automatically added to your site. Use the <my-extension-name>-config.js file in the folder to set the default configuration for your implementation of the custom extension.

For more information on setting your configuration, see Tutorial: Payment Settings Custom Extension.

Syntax

function getConfig(): Promise<PaymentSettingsConfigResponse>

getConfig Parameters

This function does not take any parameters.

Returns

Fulfilled - The configuration settings.

Return Type:

Promise<PaymentSettingsConfigResponse>
NAME
TYPE
DESCRIPTION
fallbackValueForRequires3dSecure
boolean

The value to set for paymentSettings.requires3dSecure if the SPI call fails.

Default: false

Was this helpful?

Example of a configuration file

Copy Code
1// Place this code in the <my-extension-name>-config.js file
2// in the 'ecom-payment-settings' folder of the
3// Custom Extensions section on your site.
4
5export function getConfig() {
6 return {
7 fallbackValueForRequires3dSecure: true
8 };
9};