NTP-24997 | PS | added completion time param in polling (#14435)

This commit is contained in:
Prakhar Saxena
2025-01-03 20:16:23 +05:30
committed by GitHub
parent f8fdf1085e
commit 5d9ae3490d
3 changed files with 17 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
/*
*
* * Copyright © 2024 by Navi Technologies Limited
* * Copyright © 2024-2025 by Navi Technologies Limited
* * All rights reserved. Strictly confidential
*
*/
@@ -63,6 +63,7 @@ import com.navi.payment.utils.Constants.KEY_DATA
import com.navi.payment.utils.Constants.PAYMENT_METHOD
import com.navi.payment.utils.Constants.SCREEN_NAME
import com.navi.payment.utils.Constants.STATUS
import com.navi.payment.utils.Constants.TRANSACTION_COMPLETION_TIME
import com.navi.payment.utils.Constants.TRANSACTION_REFERENCE_ID
import com.navi.payment.utils.PaymentSource
import com.ramcosta.composedestinations.annotation.Destination
@@ -193,7 +194,11 @@ fun TransactionPollingScreen(
STATUS to pollingState.data?.status.orEmpty(),
PAYMENT_METHOD to
pollingState.data?.data?.transactionDetails?.paymentMode.orEmpty(),
SCREEN_NAME to sourceDestination
SCREEN_NAME to sourceDestination,
TRANSACTION_COMPLETION_TIME to
(System.currentTimeMillis() -
transactionPollingViewModel.pollingStartTime)
.toString()
)
)
val data = pollingState.data
@@ -216,7 +221,11 @@ fun TransactionPollingScreen(
SCREEN_NAME to sourceDestination,
TRANSACTION_REFERENCE_ID to request.transactionReferenceId.orEmpty(),
STATUS to pollingState.status.orEmpty(),
PAYMENT_METHOD to pollingState.paymentMethod.orEmpty()
PAYMENT_METHOD to pollingState.paymentMethod.orEmpty(),
TRANSACTION_COMPLETION_TIME to
(System.currentTimeMillis() -
transactionPollingViewModel.pollingStartTime)
.toString()
)
)
if (sourceDestination == NaviPaymentScreenType.MINI_PAYMENT_SCREEN.name) {

View File

@@ -1,6 +1,6 @@
/*
*
* * Copyright © 2024 by Navi Technologies Limited
* * Copyright © 2024-2025 by Navi Technologies Limited
* * All rights reserved. Strictly confidential
*
*/
@@ -101,6 +101,8 @@ constructor(
val isChristmasCelebrationExperimentEnabled =
_isChristmasCelebrationExperimentEnabled.asStateFlow()
val pollingStartTime = System.currentTimeMillis()
init {
pollTransactionStatus()
setLitmusExperimentValues()

View File

@@ -1,6 +1,6 @@
/*
*
* * Copyright © 2023-2024 by Navi Technologies Limited
* * Copyright © 2023-2025 by Navi Technologies Limited
* * All rights reserved. Strictly confidential
*
*/
@@ -96,6 +96,7 @@ object Constants {
const val PAYMENT_CANCEL_SOURCE = "payment_cancel_source"
const val MIN_APP_VERSION = "minAppVersion"
const val PAYMENT_METHOD = "payment_method"
const val TRANSACTION_COMPLETION_TIME = "transaction_completion_time"
const val TURBO_CHECKOUT_SCREEN_NAME = "MPS"
const val FULL_SCREEN_PAYMENT_SCREEN_NAME = "NPS"