The PaymentSdk is the main entry point for the SDK. Connection management is handled by this component.
Displays the current configuration, or launches the setup wizard if setup is required. This is useful both when handling StatusCode.SetupRequired and displaying a general settings screen. This should be overridden by a method that also accepts the appropriate context/controller to display the setup screens, or returns the controller to be pushed onto the stack, this method is only provided to require subclasses to implement the necessary command, and should be hidden or restricted from being called directly.
Initializes the SDK, checking that the configuration is correct and the Engage device is configured and reachable. The listener receives a Status with type Status.STATUS_INITIALIZED. Expect StatusCode.SetupRequired to be sent if the device is not configured. Internally, create the platform context, coordinator, load the configuration, and initialize the various modules such as transport, payment adapter, and navigator.
initializeFromFile(CommerceListener2 listener, String path)¶
Initializes the SDK using the values read from the file combined with the values configured by the user and detected by the system. It’s important that the application already has the necessary permissions to read this file, the SDK will only try to read it directly. The file must be configured according to the configuration file documentation.
Teardown the session and all associated connections. Any objects that were returned from methods like getTransactionManager() will also be torn down after this call and any remaining references should not be used.