Open the payment UI
Create Pay Station Intent
To open the payment UI, pass the token obtained in the previous step to the XPayments.createIntentBuilder SDK method.
Copy
- kotlin
val intent = XPayments.createIntentBuilder(getContext())
.accessToken(AccessToken(token))
.isSandbox(BuildConfig.IS_SANDBOX)
.build()
Start activity using created Intent
Copy
- kotlin
startActivityForResult(intent, RC_PAYSTATION)
Parse activity result
Copy
- kotlin
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (requestCode == RC_PAYSTATION) {
val result = XPayments.Result.fromResultIntent(data)
}
}
Was this article helpful?
Thank you for your feedback!
We'll review your message and use it to help us improve your experience.