OnCreateComponentListener()
OnCreateComponentListener() is a callback function used to listen for the creation results of Payment Element or Vaulting Element components, and receives callback notifications when the component creation status changes.
Register listener
Java
Kotlin
copy
public void setOnCreateComponentListener(OnCreateComponentListener listener)Parameters
Parameter | Type | Required | Description |
listener | Yes | Used to return a callback for the component creation status. |
Obtain listener
Java
Kotlin
copy
public OnCreateComponentListener getOnCreateComponentListener()Return value
Type | Description |
OnCreateComponentListener | Return the currently registered creation callback; returns |
Callback method
Java
Kotlin
copy
void onCreateComponentCallback(AMSStatusResult result)Parameters
Parameter | Type | Required | Description |
result | Yes | Status result, indicates whether component creation is successful. |
Return value
This method does not return any value.