On This Page
REST API
Creating an mposUI Instance Using the create
Function
mposUI
Instance Using the create
FunctionFollow these steps to create an
mposUi
instance. This instance is
required to access the functionality of the Tap to Phone Android SDK.- Create anmposUiinstance using thecreatefunction.
- Set themerchantIdfield value to the merchant ID you obtained.
- Set themerchantSecretfield value to the secret key you obtained.
- Specify the environment by setting theproviderModefield value toTESTor toLIVE.
- Use theProviderMode.TESTsetting to test your integration without charging a real payment card.
- Use theProviderMode.LIVEsetting to perform live transactions.
val mposUi = MposUi.create( providerMode = ProviderMode.LIVE, // ProviderMode.TEST merchantId = "MerchantId", merchantSecret = "SecretKey" )