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

copy
public void setOnCreateComponentListener(OnCreateComponentListener listener)

Parameters

Parameter

Type

Required

Description

listener

OnCreateComponentListener

Yes

Used to return a callback for the component creation status.

Obtain listener

copy
public OnCreateComponentListener getOnCreateComponentListener()

Return value

Type

Description

OnCreateComponentListener

Return the currently registered creation callback; returns null if none is set.

Callback method

copy
void onCreateComponentCallback(AMSStatusResult result)

Parameters

Parameter

Type

Required

Description

result

AMSStatusResult

Yes

Status result, indicates whether component creation is successful.

Return value

This method does not return any value.