NTP-43193 | Collect request vpa case handling (#15236)
This commit is contained in:
@@ -320,7 +320,7 @@ constructor(
|
||||
linkedAccounts: List<LinkedAccountEntity>,
|
||||
): String {
|
||||
return linkedAccounts
|
||||
.firstOrNull { it.vpa == collectRequestEntity.payerVpa }
|
||||
.firstOrNull { it.vpa.equals(collectRequestEntity.payerVpa, ignoreCase = true) }
|
||||
?.bankCode
|
||||
.orEmpty()
|
||||
}
|
||||
|
||||
@@ -1259,7 +1259,9 @@ constructor(
|
||||
|
||||
// Self Pay case
|
||||
if (transactionType == UpiTransactionType.SELF_PAY) {
|
||||
updatedLinkedAccounts.removeAll { it.vpa == payeeEntity.value.vpa }
|
||||
updatedLinkedAccounts.removeAll {
|
||||
it.vpa.equals(payeeEntity.value.vpa, ignoreCase = true)
|
||||
}
|
||||
}
|
||||
|
||||
return updatedLinkedAccounts
|
||||
@@ -1473,7 +1475,7 @@ constructor(
|
||||
|
||||
// Self pay case
|
||||
if (
|
||||
liteAccount.vpa == payeeEntity.value.vpa &&
|
||||
liteAccount.vpa.equals(payeeEntity.value.vpa, ignoreCase = true) &&
|
||||
transactionType == UpiTransactionType.SELF_PAY
|
||||
) {
|
||||
liteAccount.eligibilityState =
|
||||
@@ -3124,8 +3126,9 @@ constructor(
|
||||
return@launch
|
||||
}
|
||||
val vpaEntity =
|
||||
selectedBankAccount.value?.vpaEntityList?.firstOrNull { it.vpa == source.payerVpa }
|
||||
?: return@launch
|
||||
selectedBankAccount.value?.vpaEntityList?.firstOrNull {
|
||||
it.vpa.equals(source.payerVpa, ignoreCase = true)
|
||||
} ?: return@launch
|
||||
|
||||
naviPayPspManager.evaluateAndOnboardPspForVpa(
|
||||
vpaEntity = vpaEntity,
|
||||
@@ -3269,8 +3272,9 @@ constructor(
|
||||
}
|
||||
|
||||
val vpaEntity =
|
||||
selectedBankAccount.value?.vpaEntityList?.firstOrNull { it.vpa == source.payerVpa }
|
||||
?: return@launch
|
||||
selectedBankAccount.value?.vpaEntityList?.firstOrNull {
|
||||
it.vpa.equals(source.payerVpa, ignoreCase = true)
|
||||
} ?: return@launch
|
||||
|
||||
naviPayPspManager.evaluateAndOnboardPspForVpa(
|
||||
vpaEntity = vpaEntity,
|
||||
|
||||
@@ -289,7 +289,7 @@ constructor(
|
||||
private suspend fun isVpaInputSelfVpa(vpaInput: String): Boolean {
|
||||
val linkedAccountEntities = linkedAccountsUseCase.execute(screenName = screenName).first()
|
||||
return linkedAccountEntities.any { linkedAccount ->
|
||||
linkedAccount.vpaEntityList.any { it.vpa == vpaInput }
|
||||
linkedAccount.vpaEntityList.any { it.vpa.equals(vpaInput, ignoreCase = true) }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -331,7 +331,10 @@ constructor(
|
||||
)
|
||||
}
|
||||
} else { // For approve mandate, only payer VPA account is eligible
|
||||
EligibilityState(isAccountEligible = linkedAccountEntity.vpa == mandateEntity?.payerVpa)
|
||||
EligibilityState(
|
||||
isAccountEligible =
|
||||
linkedAccountEntity.vpa.equals(mandateEntity?.payerVpa, ignoreCase = true)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -339,7 +342,7 @@ constructor(
|
||||
|
||||
val defaultSelectedAccount =
|
||||
linkedAccounts.firstOrNull { linkedAccount ->
|
||||
linkedAccount.vpa == mandateEntity?.payerVpa
|
||||
linkedAccount.vpa.equals(mandateEntity?.payerVpa, ignoreCase = true)
|
||||
} ?: linkedAccounts.first()
|
||||
|
||||
updateSelectedBankAccount(selectedBankAccount = defaultSelectedAccount)
|
||||
@@ -938,7 +941,7 @@ constructor(
|
||||
} else {
|
||||
val vpaEntity =
|
||||
selectedBankAccount.value?.vpaEntityList?.firstOrNull {
|
||||
it.vpa == mandateEntity?.payerVpa
|
||||
it.vpa.equals(mandateEntity?.payerVpa, ignoreCase = true)
|
||||
} ?: return
|
||||
naviPayPspManager.evaluateAndOnboardPspForVpa(
|
||||
vpaEntity = vpaEntity,
|
||||
|
||||
@@ -661,7 +661,9 @@ private fun SavedBeneficiaryItemView(
|
||||
Spacer(modifier = Modifier.width(24.dp))
|
||||
|
||||
Column(modifier = Modifier.width(24.dp)) {
|
||||
if (savedBeneficiaryEntity.vpa == activeQueryVpa && showLoader) {
|
||||
if (
|
||||
savedBeneficiaryEntity.vpa.equals(activeQueryVpa, ignoreCase = true) && showLoader
|
||||
) {
|
||||
NaviPayLottieAnimation(
|
||||
modifier = Modifier,
|
||||
lottieFileName = NAVI_PAY_PURPLE_CTA_LOADER_LOTTIE,
|
||||
|
||||
@@ -349,7 +349,7 @@ constructor(
|
||||
|
||||
private fun isExistingAccountVpa(vpa: String): Boolean {
|
||||
return linkedAccounts.value.any { linkedAccount ->
|
||||
linkedAccount.vpaEntityList.any { it.vpa == vpa }
|
||||
linkedAccount.vpaEntityList.any { it.vpa.equals(vpa, ignoreCase = true) }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -452,7 +452,9 @@ constructor(
|
||||
) {
|
||||
selectedBankAccount.update {
|
||||
linkedAccounts.firstOrNull { linkedAccountEntity ->
|
||||
linkedAccountEntity.vpaEntityList.any { vpaInfo -> vpaInfo.vpa == payerVpa }
|
||||
linkedAccountEntity.vpaEntityList.any { vpaInfo ->
|
||||
vpaInfo.vpa.equals(payerVpa, ignoreCase = true)
|
||||
}
|
||||
}
|
||||
}
|
||||
// can be null for completed mandate as customer could have deleted that account for which
|
||||
|
||||
Reference in New Issue
Block a user