setup
Sets up the PosLink integration.
If there's no device linked info or no authentication saved in the SDK, it will show Teya UI to help the user authenticate to their Teya account and/or link to their Teya payment device.
If no device is linked or authentication data is missing, the SDK will display the Teya UI to guide the user through authentication and device linking. This process typically occurs only during the initial setup or after invoking clearDeviceLink or clearUserAuth. In such cases, the UI will prompt the user to complete the necessary steps.
Parameters
Callback invoked when setup fails with SetupFailure.
Callback invoked when setup is successful com.teya.unifiedepossdk.TeyaCommonTransactionsApi.
Like setup but allows for passing in a Store that will be used to get the list of terminals. UI to show a list of stores will not be shown in this case.
Can be useful if your app is already selecting stores some other way or if you want to link to a different terminal but keep the current store (in that case you can pass the previous store returned by linkedDeviceDetails before calling clearDeviceLink).
NOTE: if you only have/care about the store id, you can pass all other store details as empty strings. The SDK does not require any other detail, but it will expose whatever is received here back to you via linkedDeviceDetails.
Parameters
Store that the ePOS will be linked to, avoiding the need to ask the user to select one.
Callback invoked when setup fails with Failure.
Callback invoked when setup is successful com.teya.unifiedepossdk.TeyaCommonTransactionsApi.
Deprecated
Use setup with PosLinkSDK.SetupFailure instead of PosLinkSDK.Failure