⚠️

This method is deprecated. Use getPaymentMethodResource instead.

Call this method to retrieve assets for a given paymentMethodType.

12345678910
@Deprecated(  message = "This method is deprecated.",  replaceWith = ReplaceWith("getPaymentMethodResource(context, paymentMethodType)"))@Throws(SdkUninitializedException::class)@JvmStaticfun getPaymentMethodAsset(  context: Context,  paymentMethodType: String): PrimerPaymentMethodAsset
kotlin
copy

Parameters

context
ContextRequired

Android Context of your Activity or Fragment.

paymentMethodType
StringRequired

A unique string identifier for the payment method. Supported payment methods for current client session are returned in onAvailablePaymentMethodsLoaded callback.

Returns

paymentMethodType
StringRequired

A unique string identifier for the payment method. Supported payment methods for current client session are returned in onAvailablePaymentMethodsLoaded callback.

paymentMethodName
StringRequired
An user friendly English localized string identifier for the payment method.
Properties
colored
Drawable?

A Drawable to be used anywhere.

dark
Drawable?

A Drawable to be used on dark theme.

light
Drawable?

A Drawable to be used on light theme.

paymentMethodBackgroundColor
PrimerPaymentMethodBackgroundColorRequired
Properties
colored
@ColorInt Int?

A @ColorInt to be used anywhere.

dark
@ColorInt Int?

A @ColorInt to be used on dark theme.

light
@ColorInt Int?

A @ColorInt to be used on light theme.

Throws

An exception that will be thrown in case the SDK was not initialized properly. Before calling any of the manager's method, the SDK must be initialized using start method.