added support for static QR payments from BML cards
Auto Tag on Version Change / check-version (push) Successful in 5s
Auto Tag on Version Change / check-version (push) Successful in 5s
This commit is contained in:
@@ -1,9 +1,19 @@
|
||||
package sh.sar.basedbank.util.bmlapi
|
||||
|
||||
import sh.sar.basedbank.R
|
||||
import sh.sar.basedbank.api.models.BankAccount
|
||||
|
||||
object BmlCardParser {
|
||||
|
||||
/** Returns the drawable res for the card network logo, or null for non-card/unknown. */
|
||||
fun cardNetworkIcon(account: BankAccount): Int? = when {
|
||||
account.productCode.startsWith("C1") -> R.drawable.visa
|
||||
account.productCode.startsWith("C3") -> R.drawable.americanexpress
|
||||
account.productCode == "C8905" || account.productCode == "C8995" -> R.drawable.visa
|
||||
account.productCode.startsWith("C8") -> R.drawable.mastercard
|
||||
else -> null
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the asset path for the card image.
|
||||
* The product code is stored in [BankAccount.productCode] for BML Card accounts.
|
||||
|
||||
Reference in New Issue
Block a user