PrimerHeadlessUniversalCheckoutListener
and start headless universal checkout with your client token.onAvailablePaymentMethodsLoaded
now returns a list of payment methods with improved functionality.Instead of just a string, each payment method returned contains the following:paymentMethodType
a unique string identifier for the payment method.paymentMethodManagerCategories
a list that defines the payment method managers that can be used with this payment method (i.e. NATIVE_UI
or RAW_DATA
).requiredInputDataClass
this is provided when paymentMethodManagerCategories
contains RAW_DATA
and indicates the type of data that should be captured for the payment method.supportedPrimerSessionIntents
a list of PrimerSessionIntent
which defines what intents can be used with this payment method (i.e. CHECKOUT
or VAULT
).headlessUniversalCheckout.makeView
like in the example below:PrimerHeadlessUniversalCheckoutAssetsManager
that provides payment method assets per payment method type. See below:paymentMethodType
a unique string identifier for the payment method.paymentMethodName
a user friendly English localized string identifier for the payment method (e.g. Google Pay
)paymentMethodLogo
an instance of the PrimerPaymentMethodLogopaymentMethodBackgroundColor
an instance of the PrimerPaymentMethodBackgroundColor
PrimerPaymentMethodLogo
holds Drawable
objects for different scenarioscolored
a Drawable
to be used anywheredark
a Drawable
to be used in dark modelight
a Drawable
to be used in light modePrimerPaymentMethodBackgroundColor
holds @ColorInt
objects for different scenarios[Optional] colored
a @ColorInt
to be used anywhere
[Optional] dark
a @ColorInt
to be used in dark mode
[Optional] light
a @ColorInt
to be used in light mode
With the above images and colors you can build your own payment method buttons 💪showPaymentMethod
directly for some payment methods while having managers for others.Now each payment method belongs to a payment method manager, as indicated by paymentMethodManagerCategories
on the list of available payment methods.submit
on the raw data manager. See example integration below:PrimerHeadlessUniversalCheckout.current.start(uiListener = )
.Before v2.17.0 | After 2.17.0 |
---|---|
fun onResumeSuccess | Renamed to onCheckoutResume |
fun onAdditionalInfoReceived | Renamed to onCheckoutAdditionalInfoReceived |
Before v2.17.0 | After 2.17.0 |
---|---|
func onPreparationStarted(paymentMethodType: String) | Moved to PrimerHeadlessUniversalCheckoutUiListener |
func onPaymentMethodShowed(paymentMethodType: String) | Moved to PrimerHeadlessUniversalCheckoutUiListener |
Raw Data Managers
have changed structures and naming: