1
getAssetsManager(): IAssetsManager
ts
copy
Get an instance of IAssetsManager
, which can be used to load and manage Primer's checkout assets.
Returns
An instance of IAssetsManager
.
IAssetsManager
getPaymentMethodAsset
(type: PaymentMethodType) => Promise<ButtonPaymentMethodAsset | null>Retrieves the asset for a given PaymentMethodType. Returns a promise that
resolves to the asset or null
if the asset is not available.
Parameters
type
PaymentMethodTypeOne of PaymentMethodType.
Returns
backgroundColor
objecticonUrl
objectpaymentMethodName
stringThe name of the payment method that is displayed on the payment method button. Optional.
The name of the payment method that is displayed on the payment method button. This will be null for payment methods without a button title. Optional.
displayName
stringgetCardNetworkAsset
(cardNetwork: string) => Promise<CardNetworkAsset>Retrieves the asset for a given card network. Returns a promise that resolves to the asset object.
Parameters
cardNetwork
stringThe network value, for example: VISA
, MASTERCARD
.
Returns
cardUrl
stringdisplayName
stringThe name of the card network.
Can be used as alt
and title for the image.