Show single paymentMethod in either Primer's Checkout or Vault session.
Note that there are more options which you can set by passing your SDK settings in the configure function.
123456
fun showPaymentMethod( context: Context, clientToken: String, paymentMethod: String, intent: PrimerSessionIntent,)
kotlin
copy
Parameters
clientToken
stringRequiredA client token as returned by the create client session call.
paymentMethod
StringRequiredintent
PrimerSessionIntentRequiredExample
Availing Universal Checkout is as easy as implementing one line of code:
123456789101112
class CheckoutActivity : AppCompatActivity() { // ... private fun showPaymentMethod( clientToken: String, paymentMethodType: String, sessionIntent: PrimerSessionIntent ) { // 👇 Add this Primer.instance.showPaymentMethod(context, clientToken, paymentMethodType, sessionIntent) }}
kotlin
copy