AMSVaultElementConfiguration
AMSVaultElementConfiguration is used to configure SDK parameters before initializing Vaulting Element.
Declaration
public class AMSVaultElementConfiguration : AMSConfiguration {
public init()
}Property
Parameter | 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, Valid values are:
|
options | [String: Any]? | No | Configuration options dictionary, used to pass additional configuration parameters. See Available keys. |
Available keys
Key | Data type | Description |
sandbox | Bool | Whether to use the sandbox environment.
|
showLoading | Bool | Whether to display a loading animation during the request process.
|
notRedirectAfterComplete | Bool | Used to set whether to redirect back to your page after binding completion. Valid values are:
|
appearance | String(JSON) | Used for custom appearance configuration. For more information, refer to Appearance customization. It contains the following parameters:
|
Best practices
Redirect to the merchant page
The following scenarios describe how redirecting to the merchant page and returning binding results are handled. Please follow the guidelines below:
notRedirectAfterComplete | Binding result | Recommended action |
| Success/Failure | If you set notRedirectAfterComplete to |
| Success | After binding is completed, Vaulting Element will automatically redirect to the redirectUrl you provided in the createVaultingSession API. |
| Failure | The binding result will be returned via the |
Notes:
- If the payment method does not support binding within the SDK, the binding result will not be returned via
onSubmitPayCallback(). After completing the binding on the external payment method page, the payment method will determine whether to automatically redirect back to the redirectUrl you provided.- The binding results returned by the
onSubmitPayCallback()method are only for client-side page navigation and status display. For the final binding status, please obtain it through Step 4: Obtain the binding result.