On This Page
Create an mposUI Instance
mposUI
InstanceBefore starting this procedure, you must obtain secret key and merchant ID (MID) values to enter in to your
mposUI
instance. For more information, see Generating a Secret Key for an Existing Merchant ID.Create an
mposUI
instance to access the functionality of the PAX All-in-One Android SDK.
Follow these steps to create an
mposUi
instance:- Create anmposUiinstance using thecreatefunction.
- Set themerchantIdfield value to the merchant ID that you obtained.
- Set themerchantSecretfield value to the secret key that 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 the merchant ID and secret key you obtained from the test environment.
- Use theProviderMode.LIVEsetting to process live transactions. Use the merchant ID and secret key you obtained from the production environment.
- Configure the accessory as PAX.val mposUi = MposUi.create( providerMode = ProviderMode.LIVE, // ProviderMode.TEST merchantId = "MerchantId", merchantSecret = "SecretKey", terminalParameters = AccessoryParameters.Builder(AccessoryFamily.PAX).integrated().build() )