This commit is contained in:
@@ -694,6 +694,26 @@ class BmlLoginFlow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val unbilled = payload.optJSONObject("unbilled")
|
||||||
|
?.optJSONArray("CardUnbillTxnDetails")
|
||||||
|
if (unbilled != null) {
|
||||||
|
for (i in 0 until unbilled.length()) {
|
||||||
|
val item = unbilled.getJSONObject(i)
|
||||||
|
result.add(Transaction(
|
||||||
|
id = "unbilled_${item.optString("TranApprCode")}_$i",
|
||||||
|
date = item.optString("DateTime"),
|
||||||
|
description = item.optString("TranDesc").trim(),
|
||||||
|
amount = item.optDouble("BillingAmount", 0.0),
|
||||||
|
currency = item.optString("BillingCcy", "MVR"),
|
||||||
|
counterpartyName = null,
|
||||||
|
reference = item.optString("TranApprCode").takeIf { it.isNotBlank() },
|
||||||
|
accountNumber = accountNumber,
|
||||||
|
accountDisplayName = accountDisplayName,
|
||||||
|
source = "BML_CARD"
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
val statement = payload.optJSONArray("cardstatement")
|
val statement = payload.optJSONArray("cardstatement")
|
||||||
if (statement != null) {
|
if (statement != null) {
|
||||||
for (i in 0 until statement.length()) {
|
for (i in 0 until statement.length()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user