Initialize
Last updated
Last updated
Initialization of the PayContactlessEmbed Library
After invoking the start
method of PayContactlessEmbed
, the next crucial step is to initialize the Embed library. This function serves as a foundational call; subsequent functions from the library will be inaccessible unless the Embed library is properly initialized.
To facilitate this, the function requires an InitializeListener
interface as an argument. It's essential for the merchant application to implement the InitializeListener
class, as the library leverages its methods as delegates, ensuring seamless communication and functionality between the app and the SDK.
Handling Initialization Outcomes in PayContactlessEmbed Library
Upon successful completion of the initialize
function, the onSuccess
method is triggered. This will return a deviceId
to the integrating application, signifying a successful initialization.
However, should there be any issues during initialization, the onFailure
method will be activated. In the event of such a failure, it's imperative to diagnose the error and undertake the necessary corrective measures. For a comprehensive understanding of possible errors and their resolutions, please refer to the Error Handling section.
Find the details at Section 3.2.