AMSBaseConfiguration

AMSBaseConfiguration is the base configuration class for the SDK, used to build AMSPaymentElement or AMSVaultElement instances. It includes regional language settings, runtime options, and callback listeners.

You can pass in configurations through the constructor when creating an instance of this class, or set them after instance creation using the setLocale() or setOption() methods.

Constructor

copy
public AMSBaseConfiguration()

Parameters

Parameter

Data type

Required

Description

locale

String

No

Preferred language. Composed of a language code (ISO-639) and country code (ISO-3166) connected by an underscore, for example, new Locale("en", "US").

Note: If no value is passed or the language value passed is not within the above range, the system will default to using English.

Valid values are:

  • en_US: Default value. English
  • pt_BR: Portuguese (Brazil)
  • pt_PT: Portuguese
  • es_ES: Spanish
  • ko_KR: Korean
  • zh_CN: Simplified Chinese
  • zh_HK: Traditional Chinese
  • ms_MY: Malay
  • in_ID: Indonesian
  • th_TH: Thai
  • vi_VN: Vietnamese
  • tl_PH: Filipino
  • it_IT: Italian
  • de_DE: German
  • fr_FR: French
  • nl_NL: Dutch
  • ja_JP: Japanese
  • ro: Romanian
  • pl_PL: Polish
  • ar_SA: Arabic
  • tr_TR: Turkish
  • hi_IN: Hindi

Configurations and listeners

AMSBaseConfiguration provides two types of capabilities:

  • Static configuration capabilities: Used to set initialization parameters such as language and configuration options.
  • Event listening capabilities: Used to receive status callbacks at key lifecycle nodes of Payment Element or Vaulting Element.