added support for static QR payments from BML cards
Auto Tag on Version Change / check-version (push) Successful in 5s

This commit is contained in:
2026-05-27 20:32:17 +05:00
parent de11fbe0d3
commit e974a95708
11 changed files with 1016 additions and 9 deletions
@@ -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.