NTP-19913 | Shiv Natani | disabled credit card inst for cc payments (#14189)
Co-authored-by: Ujjwal Kumar <ujjwal.kumar@navi.com> Co-authored-by: Prakhar Saxena <prakhar.saxena@navi.com>
This commit is contained in:
@@ -1389,7 +1389,12 @@ class NaviPayAnalytics private constructor() {
|
||||
)
|
||||
}
|
||||
|
||||
fun onQrScanSuccess(qrType: String, naviPaySessionAttributes: Map<String, String>) {
|
||||
fun onQrScanSuccess(
|
||||
qrType: String,
|
||||
naviPaySessionAttributes: Map<String, String>,
|
||||
uriType: UriType,
|
||||
isQrFromUploadImage: Boolean
|
||||
) {
|
||||
NaviTrackEvent.trackEventOnClickStream(
|
||||
eventName = "NaviPay_QrScanner_ScanSuccess",
|
||||
eventValues =
|
||||
@@ -1399,6 +1404,8 @@ class NaviPayAnalytics private constructor() {
|
||||
naviPaySessionAttributes["naviPaySessionId"].orEmpty(),
|
||||
"naviPayCustomerStatus" to
|
||||
naviPaySessionAttributes["naviPayCustomerStatus"].orEmpty(),
|
||||
"uriType" to uriType.name,
|
||||
"isQrFromUploadImage" to isQrFromUploadImage.toString()
|
||||
)
|
||||
)
|
||||
}
|
||||
@@ -3212,7 +3219,11 @@ class NaviPayAnalytics private constructor() {
|
||||
actualAmount: String,
|
||||
isAmountCorrectlyPredicted: Boolean,
|
||||
isBuidCorrectlyPredicted: Boolean,
|
||||
isNotesCorrectlyPredicted: Boolean
|
||||
isNotesCorrectlyPredicted: Boolean,
|
||||
isMerchant: String,
|
||||
isMerchantVerified: String,
|
||||
txnType: String,
|
||||
transactionInitiationMode: String,
|
||||
) {
|
||||
NaviTrackEvent.trackEventOnClickStream(
|
||||
"NaviPay_Dev_Butler_Prediction_Response",
|
||||
@@ -3221,7 +3232,11 @@ class NaviPayAnalytics private constructor() {
|
||||
"actualAmount" to actualAmount,
|
||||
"isAmountCorrectlyPredicted" to isAmountCorrectlyPredicted.toString(),
|
||||
"isBuidCorrectlyPredicted" to isBuidCorrectlyPredicted.toString(),
|
||||
"isNotesCorrectlyPredicted" to isNotesCorrectlyPredicted.toString()
|
||||
"isNotesCorrectlyPredicted" to isNotesCorrectlyPredicted.toString(),
|
||||
"isMerchant" to isMerchant,
|
||||
"isMerchantVerified" to isMerchantVerified,
|
||||
"txnType" to txnType,
|
||||
"transactionInitiationMode" to transactionInitiationMode
|
||||
)
|
||||
)
|
||||
}
|
||||
@@ -3231,6 +3246,14 @@ class NaviPayAnalytics private constructor() {
|
||||
"NaviPay_Dev_Butler_Prediction_Non_Sufficient_Data"
|
||||
)
|
||||
}
|
||||
|
||||
fun onPaymentSummaryNavigationIconBackClicked() {
|
||||
NaviTrackEvent.trackEvent("NaviPay_PostPayment_Back_Clicked")
|
||||
}
|
||||
|
||||
fun onPaymentSummaryNavigationBackPressed() {
|
||||
NaviTrackEvent.trackEvent("NaviPay_PostPayment_NativeBack_Pressed")
|
||||
}
|
||||
}
|
||||
|
||||
inner class NaviPayTransactionHistoryDetailScreen {
|
||||
|
||||
@@ -396,7 +396,10 @@ fun PaymentSummaryScreen(
|
||||
}
|
||||
}
|
||||
|
||||
BackHandler { navigateToNextScreen() }
|
||||
BackHandler {
|
||||
naviPayAnalytics.onPaymentSummaryNavigationBackPressed()
|
||||
navigateToNextScreen()
|
||||
}
|
||||
|
||||
if (bottomSheetStateHolder.showBottomSheet) {
|
||||
NaviPayModalBottomSheet(
|
||||
@@ -466,7 +469,10 @@ fun PaymentSummaryScreen(
|
||||
)
|
||||
},
|
||||
onRewardsPopUpClosed = paymentSummaryViewModel::onRewardsPopUpClosed,
|
||||
onNavigationIconClicked = navigateToNextScreen,
|
||||
onNavigationIconClicked = {
|
||||
naviPayAnalytics.onPaymentSummaryNavigationIconBackClicked()
|
||||
navigateToNextScreen.invoke()
|
||||
},
|
||||
navigator = navigator,
|
||||
upiUpSellBannerEntityList = upiUpSellBannerEntityList,
|
||||
naviPaySessionAttributes =
|
||||
|
||||
@@ -1074,7 +1074,23 @@ constructor(
|
||||
mostFrequentBuid,
|
||||
isNotesCorrectlyPredicted =
|
||||
(transactionEntity.value?.transactionDetailEntity?.metaData?.remarks ?: "") ==
|
||||
mostFrequentNote
|
||||
mostFrequentNote,
|
||||
isMerchant =
|
||||
transactionEntity.value?.transactionDetailEntity?.payeeInfo?.isMerchant.toString(),
|
||||
isMerchantVerified =
|
||||
transactionEntity.value
|
||||
?.transactionDetailEntity
|
||||
?.payeeInfo
|
||||
?.isMerchantVerified
|
||||
.toString(),
|
||||
txnType =
|
||||
transactionEntity.value?.transactionDetailEntity?.metaData?.txnType.toString(),
|
||||
transactionInitiationMode =
|
||||
transactionEntity.value
|
||||
?.transactionDetailEntity
|
||||
?.metaData
|
||||
?.transactionInitiationMode
|
||||
.toString(),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -349,7 +349,9 @@ fun QrScannerScreen(
|
||||
)
|
||||
naviPayAnalytics.onQrScanSuccess(
|
||||
qrType = qrScanResult.uriType.name,
|
||||
naviPaySessionAttributes = qrScannerViewModel.getNaviPaySessionAttributes()
|
||||
naviPaySessionAttributes = qrScannerViewModel.getNaviPaySessionAttributes(),
|
||||
uriType = qrScanResult.uriType,
|
||||
isQrFromUploadImage = qrScanResult.isQrFromUploadImage
|
||||
)
|
||||
val payeeEntity = qrScanResult.payeeEntity
|
||||
if (qrScanResult.uriType == UriType.MANDATE) {
|
||||
|
||||
@@ -112,7 +112,8 @@ constructor(
|
||||
paymentPrefetchMethodRequest,
|
||||
metricInfo =
|
||||
getPMSMetricInfo(
|
||||
screenName = NaviPaymentAnalyticScreenName.CHECKOUT_SCREEN.screenName
|
||||
screenName =
|
||||
NaviPaymentAnalyticScreenName.MINI_PAYMENT_SCREEN.screenName
|
||||
)
|
||||
)
|
||||
if (response.isSuccessWithData()) {
|
||||
|
||||
@@ -34,9 +34,12 @@ constructor(private val linkedAccountsUseCase: LinkedAccountsUseCase) {
|
||||
requireDisabledAccountUpdate: Boolean = false
|
||||
): Flow<List<LinkedAccountEntity>> {
|
||||
if (pmsConnectedAccounts.isNotEmpty() && requireDisabledAccountUpdate) {
|
||||
val pmsConnectedAccountId = pmsConnectedAccounts.map { it.accountId }
|
||||
val pmsConnectedAccountId = pmsConnectedAccounts.associateBy { it.accountId }
|
||||
linkedAccountsUseCase.execute(true).first().forEach { account ->
|
||||
if (pmsConnectedAccountId.contains(account.accountId).not()) {
|
||||
if (
|
||||
pmsConnectedAccountId.contains(account.accountId).not() ||
|
||||
pmsConnectedAccountId[account.accountId]?.isDisabled == true
|
||||
) {
|
||||
disabledAccountId.add(account.accountId)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,6 +78,7 @@ import com.navi.payment.turbocheckout.model.PayAmountRequest
|
||||
import com.navi.payment.turbocheckout.ui.PayNowState
|
||||
import com.navi.payment.utils.Constants
|
||||
import com.navi.payment.utils.Constants.COIN_DISCOUNT_APPLY_DELAY
|
||||
import com.navi.payment.utils.Constants.LINKED_ACCOUNT_SYNC_DELAY
|
||||
import com.navi.payment.utils.Constants.MINI_PAYMENT_SCREEN
|
||||
import com.navi.payment.utils.Constants.SCREEN_NAME
|
||||
import com.navi.payment.utils.getPMSMetricInfo
|
||||
@@ -602,6 +603,7 @@ constructor(
|
||||
}
|
||||
|
||||
private suspend fun getNaviUpiConnectedAccounts() {
|
||||
delay(LINKED_ACCOUNT_SYNC_DELAY)
|
||||
pmsLinkedAccountUseCase.execute().collectLatest {
|
||||
naviUpiConnectedAccounts = it
|
||||
handleNaviUpiConnectedAccountsUpdate()
|
||||
|
||||
Reference in New Issue
Block a user