Binds bank card. If bank card was bound earlier, rewrites it
MobileSdk.bindNewCardForResult(
activity: AppCompatActivity,
mobileAuthorizationToken: String,
bindingMethodData: Binding.Data,
showStatusScreen: Boolean = true,
customizations: ArrayList<Customization>? = null,
environment: Environments,
launcher: ActivityResultLauncher<Intent>
)
activity
for calling our ActivitymobileAuthorizationToken
Mobile token received from Unlimint (authentication mobile token)bindingMethodData
needed information for bindinglauncher
ActivityResultLauncher instance received after registering for activity resultenvironment
Environment to send requests to
showStatusScreen
flag that manages rendering of Unlimint's status screen (Success/Decline), default value is truecustomizations
list of parameters to render custom texts and colors of UI elements
To start using SDK one must get authorization token from our backend mobile service. Examples of getting token can be found in code of this project. Mobile service API described here
UnlimintSdk.bindNewCardForResult(
activity = activity,
mobileAuthorizationToken = token,
bindingMethodData = Binding.Data(
currency = Currency.getInstance("USD),
type = Binding.Type.fromString("PAYMENT"),
customer = Customer(
id = "some-customer-id",
email = "[email protected]"
),
merchantOrder = MerchantOrder(
description = "some description",
id = "some-id"
)
),
environment = serverType.environments,
launcher = launcher
)
UnlimintSdk.bindNewCardForResult(
activity = activity,
mobileAuthorizationToken = token,
bindingMethodData = Binding.Data(
currency = Currency.getInstance("USD),
type = Binding.Type.fromString("RECURRING"),
customer = Customer(
id = "some-customer-id",
email = "[email protected]"
),
merchantOrder = MerchantOrder(
description = "some description",
id = "some-id"
)
),
environment = serverType.environments,
launcher = launcher
)