NTP-27358 | Revert christmas experience (#14509)

This commit is contained in:
shreyansu raj
2025-01-13 12:32:25 +05:30
committed by GitHub
parent 26798d3ce1
commit 9d742dca7b
12 changed files with 12 additions and 1941 deletions

View File

@@ -1555,13 +1555,7 @@ private fun SharedTransitionScope.ScratchCardOnLandSection(
horizontalAlignment = Alignment.CenterHorizontally,
) {
Image(
painter =
painterResource(
id =
if (isChristmasCelebrationExperimentEnabled)
CommonR.drawable.ic_np_scratch_card_christmas_celebration_with_coin
else CommonR.drawable.ic_np_scratch_card_with_coin
),
painter = painterResource(id = CommonR.drawable.ic_np_scratch_card_with_coin),
contentDescription = "",
modifier =
Modifier.alpha(alpha)
@@ -1939,24 +1933,12 @@ private fun SharedTransitionScope.RewardsBottomBarWithStripSection(
),
) {
Image(
painter =
painterResource(
id =
if (isChristmasCelebrationExperimentEnabled)
CommonR.drawable.ic_np_scratch_christmas_celebration_stripe
else CommonR.drawable.ic_np_scratch_stripe
),
painter = painterResource(id = CommonR.drawable.ic_np_scratch_stripe),
contentDescription = EMPTY,
)
}
Image(
painter =
painterResource(
id =
if (isChristmasCelebrationExperimentEnabled)
CommonR.drawable.ic_np_scratch_card_christmas_celebration_with_coin
else CommonR.drawable.ic_np_scratch_card_with_coin
),
painter = painterResource(id = CommonR.drawable.ic_np_scratch_card_with_coin),
contentDescription = EMPTY,
modifier =
Modifier.padding(start = 20.dp, bottom = 8.dp)

View File

@@ -1,105 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="78dp"
android:height="54dp"
android:viewportWidth="78"
android:viewportHeight="54">
<path
android:pathData="M20.107,18.235L25.521,29.128C25.618,29.317 25.54,29.555 25.344,29.649L12.311,36.129C12.122,36.226 11.884,36.147 11.79,35.951L6.376,25.058L20.101,18.232L20.107,18.235Z"
android:fillColor="#50CDEF"/>
<path
android:pathData="M10.094,23.215L8.227,28.77L7.397,27.111L8.429,24.042L10.094,23.215Z"
android:fillColor="#78438E"/>
<path
android:pathData="M14.097,21.22L10.217,32.78L9.389,31.114L12.438,22.05L14.097,21.22Z"
android:fillColor="#78438E"/>
<path
android:pathData="M18.109,19.229L12.449,36.064L12.313,36.129C12.124,36.226 11.886,36.147 11.792,35.952L11.377,35.114L16.436,20.053L18.102,19.226L18.109,19.229Z"
android:fillColor="#78438E"/>
<path
android:pathData="M20.279,18.58L21.107,20.246L16.46,34.074L14.795,34.901L20.279,18.58Z"
android:fillColor="#78438E"/>
<path
android:pathData="M22.274,22.587L23.102,24.253L20.466,32.083L18.807,32.913L22.274,22.587Z"
android:fillColor="#78438E"/>
<path
android:pathData="M24.26,26.597L25.087,28.262L24.472,30.091L22.806,30.919L24.26,26.597Z"
android:fillColor="#78438E"/>
<path
android:pathData="M20.11,18.238L20.861,19.755L6.798,25.908L6.385,25.064L20.11,18.238Z"
android:strokeAlpha="0.6"
android:fillColor="#4B2660"
android:fillAlpha="0.6"/>
<path
android:pathData="M19.764,17.311L5.858,24.223C5.664,24.319 5.585,24.554 5.681,24.748L6.189,25.769C6.285,25.962 6.52,26.041 6.714,25.945L20.62,19.033C20.813,18.937 20.892,18.702 20.796,18.508L20.289,17.487C20.192,17.294 19.957,17.215 19.764,17.311Z"
android:fillColor="#A872C1"/>
<path
android:pathData="M7.811,22.065L7.83,20.848C7.832,20.609 8.046,20.437 8.277,20.475L12.897,21.18L8.303,22.455C8.055,22.527 7.804,22.334 7.808,22.072L7.811,22.065Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M8.17,18.666L9.402,17.242C9.566,17.057 9.857,17.066 10.012,17.264L12.9,21.172L8.317,19.28C8.075,19.176 7.999,18.864 8.17,18.666Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M11.992,15.95L13.926,15.796C14.19,15.778 14.398,16.015 14.333,16.274L13.172,21.178L11.654,16.464C11.58,16.222 11.747,15.977 11.995,15.959L11.992,15.95Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M15.908,16.849L16.875,17.575C17.082,17.725 17.083,18.028 16.882,18.19L13.165,21.175L15.322,16.985C15.431,16.768 15.705,16.707 15.899,16.853L15.908,16.849Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M13.667,20.346L11.957,21.195L17.984,33.322L19.694,32.472L13.667,20.346Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M58.1,30.8L54.02,43.46C53.95,43.69 54.07,43.92 54.3,44L69.45,48.88C69.68,48.95 69.91,48.83 69.99,48.6L74.06,35.94L58.09,30.8H58.1Z"
android:fillColor="#F9704B"/>
<path
android:pathData="M69.74,34.55L72.66,40.26L73.29,38.33L71.67,35.18L69.74,34.55Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M65.08,33.05L71.16,44.92L71.78,42.98L67.01,33.68L65.08,33.05Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M60.43,31.55L69.29,48.83L69.44,48.88C69.67,48.95 69.9,48.83 69.98,48.6L70.29,47.63L62.37,32.17L60.44,31.54L60.43,31.55Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M57.97,31.2L57.34,33.13L64.62,47.33L66.55,47.95L57.97,31.2Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M56.47,35.86L55.85,37.79L59.96,45.83L61.9,46.46L56.47,35.86Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M54.97,40.52L54.34,42.45L55.31,44.32L57.24,44.95L54.97,40.52Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M58.1,30.8L57.53,32.56L73.73,36.92L74.04,35.94L58.1,30.8Z"
android:strokeAlpha="0.6"
android:fillColor="#4B2660"
android:fillAlpha="0.6"/>
<path
android:pathData="M57.85,29.59L74.96,35.11C75.19,35.18 75.32,35.43 75.24,35.66L74.86,36.83C74.79,37.06 74.54,37.19 74.31,37.11L57.2,31.59C56.97,31.52 56.84,31.27 56.92,31.04L57.3,29.87C57.37,29.64 57.62,29.51 57.85,29.59Z"
android:fillColor="#F9704B"/>
<path
android:pathData="M72.02,32.93L71.8,31.62C71.76,31.36 71.5,31.21 71.25,31.29L66.37,32.8L71.55,33.43C71.83,33.46 72.06,33.22 72.02,32.94V32.93Z"
android:fillColor="#F2CE36"/>
<path
android:pathData="M71.07,29.32L69.51,27.98C69.31,27.8 68.98,27.86 68.86,28.1L66.37,32.79L71.01,30C71.26,29.85 71.29,29.5 71.06,29.31L71.07,29.32Z"
android:fillColor="#F2CE36"/>
<path
android:pathData="M66.5,27L64.39,27.14C64.1,27.16 63.92,27.45 64.03,27.72L66.09,32.83L66.96,27.48C67.01,27.21 66.79,26.97 66.51,26.99L66.5,27Z"
android:fillColor="#F2CE36"/>
<path
android:pathData="M62.42,28.62L61.49,29.56C61.29,29.76 61.34,30.09 61.58,30.23L66.08,32.85L63.07,28.67C62.92,28.46 62.61,28.43 62.42,28.62Z"
android:fillColor="#F2CE36"/>
<path
android:pathData="M65.41,32.03L67.4,32.67L62.86,46.76L60.87,46.12L65.41,32.03Z"
android:fillColor="#F2CE36"/>
<path
android:pathData="M63.83,31.52L62.74,46.72L54.29,44C54.07,43.92 53.94,43.69 54.02,43.46L57.78,31.78L57.2,31.59C56.97,31.51 56.84,31.27 56.92,31.04L57.29,29.87C57.37,29.64 57.62,29.51 57.85,29.59L63.83,31.52Z"
android:strokeAlpha="0.7"
android:fillColor="#0F0015"
android:fillAlpha="0.7"/>
<path
android:pathData="M18.237,4.872C18.372,4.897 18.372,5.103 18.237,5.128C16.043,5.532 15.532,6.043 15.128,8.238C15.103,8.372 14.897,8.372 14.872,8.238C14.468,6.043 13.957,5.532 11.762,5.128C11.628,5.103 11.628,4.897 11.762,4.872C13.957,4.468 14.468,3.957 14.872,1.762C14.897,1.628 15.103,1.628 15.128,1.762C15.532,3.957 16.043,4.468 18.237,4.872Z"
android:fillColor="#FFB400"/>
<path
android:pathData="M73.239,18.868C73.373,18.895 73.373,19.105 73.239,19.132C71.813,19.419 71.419,19.813 71.132,21.239C71.105,21.373 70.895,21.373 70.868,21.239C70.581,19.813 70.187,19.419 68.761,19.132C68.627,19.105 68.627,18.895 68.761,18.868C70.187,18.581 70.581,18.187 70.868,16.761C70.895,16.627 71.105,16.627 71.132,16.761C71.419,18.187 71.813,18.581 73.239,18.868Z"
android:fillColor="#FFB400"/>
</vector>

View File

@@ -112,7 +112,6 @@ fun PaymentSummaryScreen(
NaviPayAnalytics.INSTANCE.NaviPayPaymentSummary(),
orderReferenceId: String,
transactionCompletionTime: Long,
isChristmasCelebrationExperimentEnabled: Boolean,
) {
val lifecycleOwner = LocalLifecycleOwner.current
@@ -460,8 +459,6 @@ fun PaymentSummaryScreen(
paymentSummaryViewModel.scratchCardBottomMovementAnimationDuration,
shouldPlayScratchAndWinCtaAnimation =
shouldPlayScratchAndWinCtaAnimation,
isChristmasCelebrationExperimentEnabled =
isChristmasCelebrationExperimentEnabled,
)
}
}
@@ -476,8 +473,6 @@ fun PaymentSummaryScreen(
smallScratchCardOnLandVisibilityAnimationDuration =
paymentSummaryViewModel
.smallScratchCardOnLandVisibilityAnimationDuration,
isChristmasCelebrationExperimentEnabled =
isChristmasCelebrationExperimentEnabled,
)
}
}
@@ -493,7 +488,6 @@ private fun SharedTransitionScope.ScratchCardOnLandSection(
scratchCardSizeAnimationDuration: Int,
scratchCardBottomMovementAnimationDuration: Int,
smallScratchCardOnLandVisibilityAnimationDuration: Int,
isChristmasCelebrationExperimentEnabled: Boolean,
) {
var isScratchCardFullyVisible by remember { mutableStateOf(false) }
LaunchedEffect(Unit) { isScratchCardFullyVisible = true }
@@ -524,13 +518,7 @@ private fun SharedTransitionScope.ScratchCardOnLandSection(
horizontalAlignment = Alignment.CenterHorizontally,
) {
Image(
painter =
painterResource(
id =
if (isChristmasCelebrationExperimentEnabled)
CommonR.drawable.ic_np_scratch_card_christmas_celebration_with_coin
else CommonR.drawable.ic_np_scratch_card_with_coin
),
painter = painterResource(id = CommonR.drawable.ic_np_scratch_card_with_coin),
contentDescription = "",
modifier =
Modifier.alpha(alpha)

View File

@@ -121,7 +121,6 @@ fun SharedTransitionScope.PaymentSummaryTransactionDetailSection(
rewardsBottomStripeSectionAnimationDuration: Int,
scratchCardBottomMovementAnimationDuration: Int,
shouldPlayScratchAndWinCtaAnimation: Boolean,
isChristmasCelebrationExperimentEnabled: Boolean,
) {
val onViewDetailCtaClicked = {
@@ -222,7 +221,6 @@ fun SharedTransitionScope.PaymentSummaryTransactionDetailSection(
scratchCardBottomMovementAnimationDuration =
scratchCardBottomMovementAnimationDuration,
shouldPlayScratchAndWinCtaAnimation = shouldPlayScratchAndWinCtaAnimation,
isChristmasCelebrationExperimentEnabled = isChristmasCelebrationExperimentEnabled,
)
},
)
@@ -245,7 +243,6 @@ private fun SharedTransitionScope.BottomBarSection(
rewardsBottomStripeSectionAnimationDuration: Int,
scratchCardBottomMovementAnimationDuration: Int,
shouldPlayScratchAndWinCtaAnimation: Boolean,
isChristmasCelebrationExperimentEnabled: Boolean,
) {
Column(modifier = Modifier.padding(top = 16.dp)) {
if (isRewardsCtaVisible) {
@@ -260,7 +257,6 @@ private fun SharedTransitionScope.BottomBarSection(
rewardsBottomStripeSectionAnimationDuration,
scratchCardBottomMovementAnimationDuration =
scratchCardBottomMovementAnimationDuration,
isChristmasCelebrationExperimentEnabled = isChristmasCelebrationExperimentEnabled,
)
}
Spacer(modifier = Modifier.height(16.dp))
@@ -329,7 +325,6 @@ private fun SharedTransitionScope.RewardsBottomBarWithStripSection(
scratchCardRotationAnimationDuration: Int,
rewardsBottomStripeSectionAnimationDuration: Int,
scratchCardBottomMovementAnimationDuration: Int,
isChristmasCelebrationExperimentEnabled: Boolean,
) {
val colorStops = remember {
arrayOf(
@@ -429,24 +424,12 @@ private fun SharedTransitionScope.RewardsBottomBarWithStripSection(
),
) {
Image(
painter =
painterResource(
id =
if (isChristmasCelebrationExperimentEnabled)
CommonR.drawable.ic_np_scratch_christmas_celebration_stripe
else CommonR.drawable.ic_np_scratch_stripe
),
painter = painterResource(id = CommonR.drawable.ic_np_scratch_stripe),
contentDescription = "",
)
}
Image(
painter =
painterResource(
id =
if (isChristmasCelebrationExperimentEnabled)
CommonR.drawable.ic_np_scratch_card_christmas_celebration_with_coin
else CommonR.drawable.ic_np_scratch_card_with_coin
),
painter = painterResource(id = CommonR.drawable.ic_np_scratch_card_with_coin),
contentDescription = "",
modifier =
Modifier.padding(start = 20.dp, bottom = 8.dp)

View File

@@ -79,9 +79,7 @@ import com.navi.pay.utils.INTENT_OR_SCAN_PAY_TRANSACTION_ERROR
import com.navi.pay.utils.INVALID_VPA
import com.navi.pay.utils.LINKED_ACCOUNT_SCREEN_SOURCE
import com.navi.pay.utils.NAVI_PAY_COIN_LOADER_LOTTIE
import com.navi.pay.utils.NAVI_PAY_PAYMENT_PROGRESS_CHRISTMAS_CELEBRATION_LOTTIE
import com.navi.pay.utils.NAVI_PAY_PAYMENT_PROGRESS_LOTTIE
import com.navi.pay.utils.NAVI_PAY_PAYMENT_SUCCESSFUL_CHRISTMAS_CELEBRATION_LOTTIE
import com.navi.pay.utils.NAVI_PAY_PAYMENT_SUCCESSFUL_MAIN_LOTTIE_V3
import com.navi.pay.utils.PSP_DOWN
import com.navi.pay.utils.QR_ERROR
@@ -611,18 +609,13 @@ private fun LoadingStatesView(
sendMoneyViewModel.isProcessingTextVisible.collectAsStateWithLifecycle()
val lottieBackgroundColor by
sendMoneyViewModel.lottieBackgroundColor.collectAsStateWithLifecycle()
val isChristmasCelebrationExperimentEnabled by
sendMoneyViewModel.isChristmasCelebrationExperimentEnabled.collectAsStateWithLifecycle()
when (screenState) {
is SendMoneyScreenState.PaymentInProgressPrePinInput -> {
PaymentProgressAnimation(paymentAmount = paymentAmount.text)
}
is SendMoneyScreenState.PaymentInProgressPostPinInput -> {
PaymentProgressAnimationV2(
isChristmasCelebrationExperimentEnabled = isChristmasCelebrationExperimentEnabled,
paymentAmount = paymentAmount.text,
)
PaymentProgressAnimationV2(paymentAmount = paymentAmount.text)
}
is SendMoneyScreenState.PaymentSuccess -> {
AlfredManager.setCurrentScreenName(
@@ -642,7 +635,6 @@ private fun LoadingStatesView(
NaviPayMediaPlayer(activityRef = WeakReference(naviPayActivity))
}
RenderPaymentSuccessState(
isChristmasCelebrationExperimentEnabled = isChristmasCelebrationExperimentEnabled,
navigator = navigator,
screenState = screenState,
sendMoneyViewModel = sendMoneyViewModel,
@@ -697,7 +689,6 @@ private fun LoadingStatesView(
@Composable
private fun RenderPaymentSuccessState(
isChristmasCelebrationExperimentEnabled: Boolean,
navigator: DestinationsNavigator,
screenState: SendMoneyScreenState.PaymentSuccess,
sendMoneyViewModel: SendMoneyViewModel,
@@ -709,10 +700,7 @@ private fun RenderPaymentSuccessState(
returnToSourceApp: () -> Unit,
) {
NaviPayLottieAnimationV2(
lottieFileName =
if (isChristmasCelebrationExperimentEnabled)
NAVI_PAY_PAYMENT_SUCCESSFUL_CHRISTMAS_CELEBRATION_LOTTIE
else NAVI_PAY_PAYMENT_SUCCESSFUL_MAIN_LOTTIE_V3,
lottieFileName = NAVI_PAY_PAYMENT_SUCCESSFUL_MAIN_LOTTIE_V3,
onAnimationEnd = {
if (
sendMoneyViewModel.redirectToSourceOnIntentPaymentSuccess &&
@@ -727,8 +715,6 @@ private fun RenderPaymentSuccessState(
isTransactionEligibleForNpsComms = screenState.isTransactionEligibleForNpsComms,
orderReferenceId = screenState.orderReferenceId,
transactionCompletionTime = screenState.transactionCompletionTime,
isChristmasCelebrationExperimentEnabled =
isChristmasCelebrationExperimentEnabled,
)
}
sendMoneyViewModel.resetLottieSpecs()
@@ -764,17 +750,11 @@ private fun PaymentProgressAnimation(paymentAmount: String) {
}
@Composable
private fun PaymentProgressAnimationV2(
isChristmasCelebrationExperimentEnabled: Boolean,
paymentAmount: String,
) {
private fun PaymentProgressAnimationV2(paymentAmount: String) {
val title =
stringResource(id = R.string.payment_in_progress_v2, paymentAmount.getDisplayableAmount())
FullScreenLottieV2(
lottieFileName =
if (isChristmasCelebrationExperimentEnabled)
NAVI_PAY_PAYMENT_PROGRESS_CHRISTMAS_CELEBRATION_LOTTIE
else NAVI_PAY_PAYMENT_PROGRESS_LOTTIE,
lottieFileName = NAVI_PAY_PAYMENT_PROGRESS_LOTTIE,
title = title,
lottieSize = 230.dp,
)
@@ -794,7 +774,6 @@ private fun goToPaymentSummaryScreen(
isTransactionEligibleForNpsComms: Boolean,
orderReferenceId: String,
transactionCompletionTime: Long,
isChristmasCelebrationExperimentEnabled: Boolean,
) {
navigator.clearBackStackUpToAndNavigate(
destination =
@@ -803,7 +782,6 @@ private fun goToPaymentSummaryScreen(
isTransactionEligibleForNpsComms = isTransactionEligibleForNpsComms,
orderReferenceId = orderReferenceId,
transactionCompletionTime = transactionCompletionTime,
isChristmasCelebrationExperimentEnabled = isChristmasCelebrationExperimentEnabled,
),
popUpTo = NavGraphs.root,
inclusive = false,

View File

@@ -40,7 +40,6 @@ import com.navi.common.upi.METADATA
import com.navi.common.upi.PAYER_BANK_ACCOUNT_ID
import com.navi.common.upi.SOURCE_SCREEN_NAME
import com.navi.common.upi.T_STORE_ORDER_REFERENCE_ID
import com.navi.common.usecase.LitmusExperimentsUseCase
import com.navi.common.utils.Constants.UNDERSCORE
import com.navi.common.utils.EMPTY
import com.navi.common.utils.SPACE
@@ -158,7 +157,6 @@ import com.navi.pay.utils.INTENT_OR_SCAN_PAY_TRANSACTION_ERROR
import com.navi.pay.utils.INVALID_VPA
import com.navi.pay.utils.KEY_IS_FIRST_TRANSACTION_SUCCESSFUL
import com.navi.pay.utils.LITE_MAX_SEND_MONEY
import com.navi.pay.utils.LITMUS_EXPERIMENT_NAVIPAY_CHRISTMAS_CELEBRATION
import com.navi.pay.utils.NAVI_AXIS_UPI_HANDLE
import com.navi.pay.utils.NAVI_PAY_OF_TYPE_INTENT_TRANSACTION
import com.navi.pay.utils.NAVI_PAY_PURPLE_CTA_LOADER_LOTTIE
@@ -250,7 +248,6 @@ constructor(
private val upiLiteExperimentationUseCase: UpiLiteExperimentationUseCase,
private val upiLiteCommsAndMandateExecutionHandler: UpiLiteCommsAndMandateExecutionHandler,
val accountListCheckBalanceUseCase: AccountListCheckBalanceUseCase,
private val litmusExperimentsUseCase: LitmusExperimentsUseCase,
private val sendMoneyUseCase: SendMoneyUseCase,
naviPayActivityDataProvider: NaviPayActivityDataProvider,
) : NaviPayBaseVM() {
@@ -527,10 +524,6 @@ constructor(
private val isLiteAutoTopUpExperimentEnabled = MutableStateFlow(false)
private val _isChristmasCelebrationExperimentEnabled = MutableStateFlow(false)
val isChristmasCelebrationExperimentEnabled =
_isChristmasCelebrationExperimentEnabled.asStateFlow()
private val appliedConfeeDetails = MutableStateFlow<List<SplitDetailsItem>>(emptyList())
private val startPaymentJobReference = AtomicReference<Job?>()
@@ -551,13 +544,6 @@ constructor(
isLiteAutoTopUpExperimentEnabled.update {
upiLiteExperimentationUseCase.getAutoTopExperimentData().isAutoTopUpEnabled == true
}
_isChristmasCelebrationExperimentEnabled.update {
litmusExperimentsUseCase
.execute(experimentName = LITMUS_EXPERIMENT_NAVIPAY_CHRISTMAS_CELEBRATION)
?.variant
?.enabled == true
}
}
}

View File

@@ -50,16 +50,12 @@ const val NAVI_PAY_FAIL_LOTTIE = "navi-pay-failed.lottie"
const val NAVI_PAY_PENDING_LOTTIE = "navi-pay-pending.lottie"
const val NAVI_PAY_PAYMENT_SUCCESSFUL_MAIN_LOTTIE_V2 = "navi-pay-payment-successful-main-v2.lottie"
const val NAVI_PAY_PAYMENT_SUCCESSFUL_MAIN_LOTTIE_V3 = "navi-pay-payment-successful-main-v3.lottie"
const val NAVI_PAY_PAYMENT_SUCCESSFUL_CHRISTMAS_CELEBRATION_LOTTIE =
"navi-pay-payment-successful-christmas-celebration.lottie"
const val NAVI_PAY_PRIMARY_CTA_LOADER_LOTTIE = "navi-pay-primary-cta-loader.lottie"
const val NAVI_PAY_DISABLE_UPI_LITE_SUCCESS_LOTTIE_V2 =
"navi-pay-disable-upi-lite-success-v2.lottie"
const val NAVI_PAY_COIN_LOADER_LOTTIE = "navi-pay-coin-loader.lottie"
const val NAVI_PAY_PAYMENT_PROGRESS_LOTTIE = "navi-pay-payment-loader.lottie"
const val NAVI_PAY_PAYMENT_PROGRESS_CHRISTMAS_CELEBRATION_LOTTIE =
"navi-pay-payment-christmas-celebration-loader.lottie"
const val NAVI_PAY_PURPLE_CTA_LOADER_LOTTIE = "navi-pay-purple-cta-loader.lottie"
const val NAVI_PAY_GREEN_TICK_LOTTIE = "navi-pay-green-tick.lottie"
const val NAVI_PAY_RECONNECT_UPI_NUMBER_LOTTIE = "navi-pay-reconnect-upi-number.lottie"
@@ -175,7 +171,6 @@ const val LITMUS_EXPERIMENT_NAVIPAY_LITE_DEFAULT_ENTERED_AMOUNT =
const val LITMUS_EXPERIMENT_NAVIPAY_ORDER_TAG_SUMMARY = "NaviPay-order-tag-summary"
const val LITMUS_EXPERIMENT_NAVIPAY_CHECK_BALANCE_DURING_TRANSACTION =
"NaviPay-exp-check-balance-during-transaction"
const val LITMUS_EXPERIMENT_NAVIPAY_CHRISTMAS_CELEBRATION = "NaviPay-exp-rwd-holiday-animation"
const val LITMUS_EXPERIMENT_NAVIPAY_FREQUENT_CONTACT_IN_QR_SCANNER =
"NaviPay-frequent-contact-in-qr-scanner"
const val LITMUS_EXPERIMENT_NAVIPAY_SMV_BINDING = "NaviPay-exp-smv-binding"
@@ -185,7 +180,6 @@ val NAVI_PAY_LITMUS_EXPERIMENTS =
LITMUS_EXPERIMENT_NAVIPAY_LITE_DEFAULT_ENTERED_AMOUNT,
LITMUS_EXPERIMENT_NAVIPAY_ORDER_TAG_SUMMARY,
LITMUS_EXPERIMENT_NAVIPAY_CHECK_BALANCE_DURING_TRANSACTION,
LITMUS_EXPERIMENT_NAVIPAY_CHRISTMAS_CELEBRATION,
LITMUS_EXPERIMENT_NAVIPAY_FREQUENT_CONTACT_IN_QR_SCANNER,
LITMUS_EXPERIMENT_NAVIPAY_SMV_BINDING,
)

View File

@@ -41,9 +41,7 @@ import com.navi.pay.common.ui.FullScreenLottie
import com.navi.pay.common.ui.FullScreenLottieV2
import com.navi.pay.common.ui.NaviPayLottieAnimationV2
import com.navi.pay.common.utils.NaviPayMediaPlayer
import com.navi.pay.utils.NAVI_PAY_PAYMENT_PROGRESS_CHRISTMAS_CELEBRATION_LOTTIE
import com.navi.pay.utils.NAVI_PAY_PAYMENT_PROGRESS_LOTTIE
import com.navi.pay.utils.NAVI_PAY_PAYMENT_SUCCESSFUL_CHRISTMAS_CELEBRATION_LOTTIE
import com.navi.pay.utils.NAVI_PAY_PAYMENT_SUCCESSFUL_MAIN_LOTTIE_V2
import com.navi.pay.utils.clearBackStackUpToAndNavigate
import com.navi.pay.utils.getDisplayableAmount
@@ -129,10 +127,6 @@ fun TransactionPollingScreen(
NaviPayMediaPlayer(activityRef = WeakReference(naviPaymentActivity))
}
val isChristmasCelebrationExperimentEnabled by
transactionPollingViewModel.isChristmasCelebrationExperimentEnabled
.collectAsStateWithLifecycle()
val finishWithData: (statusResponse: TransactionDetails?) -> Unit = {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
naviPaymentActivity.setTranslucent(false)
@@ -250,10 +244,7 @@ fun TransactionPollingScreen(
FullScreenLottie(lottieFileName = "gold_processing_transaction_lottie.json")
} else {
FullScreenLottieV2(
lottieFileName =
if (isChristmasCelebrationExperimentEnabled)
NAVI_PAY_PAYMENT_PROGRESS_CHRISTMAS_CELEBRATION_LOTTIE
else NAVI_PAY_PAYMENT_PROGRESS_LOTTIE,
lottieFileName = NAVI_PAY_PAYMENT_PROGRESS_LOTTIE,
title =
stringResource(
id = R.string.payment_in_progress_v2,
@@ -265,10 +256,7 @@ fun TransactionPollingScreen(
}
is PollingScreenState.Success -> {
NaviPayLottieAnimationV2(
lottieFileName =
if (isChristmasCelebrationExperimentEnabled)
NAVI_PAY_PAYMENT_SUCCESSFUL_CHRISTMAS_CELEBRATION_LOTTIE
else NAVI_PAY_PAYMENT_SUCCESSFUL_MAIN_LOTTIE_V2,
lottieFileName = NAVI_PAY_PAYMENT_SUCCESSFUL_MAIN_LOTTIE_V2,
onAnimationEnd = {
finishWithData.invoke((screenState as PollingScreenState.Success).data)
},

View File

@@ -23,11 +23,9 @@ import com.navi.common.extensions.or
import com.navi.common.model.RequestConfig
import com.navi.common.network.models.GenericErrorResponse
import com.navi.common.network.models.isSuccessWithData
import com.navi.common.usecase.LitmusExperimentsUseCase
import com.navi.common.utils.toJsonObject
import com.navi.pay.R
import com.navi.pay.common.theme.color.NaviPayColor
import com.navi.pay.utils.LITMUS_EXPERIMENT_NAVIPAY_CHRISTMAS_CELEBRATION
import com.navi.payment.model.common.SignalPaymentData
import com.navi.payment.model.paymentmethod.Amount
import com.navi.payment.nativepayment.NaviPaymentAnalyticScreenName
@@ -81,7 +79,6 @@ constructor(
private val paymentRepository: PaymentRepository,
private val paymentDataProvider: PaymentDataProvider,
private val transactionStatusUseCase: TransactionStatusUseCase,
private val litmusExperimentsUseCase: LitmusExperimentsUseCase,
private val pmsSendMoneyUseCase: PmsSendMoneyUseCase,
) : NaviPaymentBaseVM(NaviPaymentAnalyticScreenName.TRANSACTION_POLLING_SCREEN.screenName) {
@@ -114,10 +111,6 @@ constructor(
private val _statusBarColorForLottieTransition = MutableSharedFlow<Int>()
val statusBarColorForLottieTransition = _statusBarColorForLottieTransition.asSharedFlow()
private val _isChristmasCelebrationExperimentEnabled = MutableStateFlow(false)
val isChristmasCelebrationExperimentEnabled =
_isChristmasCelebrationExperimentEnabled.asStateFlow()
private val _paymentTransactionStatus =
MutableStateFlow<TransactionPollingApiStateV2>(TransactionPollingApiStateV2.Init)
val paymentTransactionStatus = _paymentTransactionStatus.asStateFlow()
@@ -126,19 +119,6 @@ constructor(
init {
if (naviUpiTransactionInfo.isNull()) pollTransactionStatus() else executeSendMoney()
setLitmusExperimentValues()
}
private fun setLitmusExperimentValues() {
viewModelScope.safeLaunch(Dispatchers.IO) {
_isChristmasCelebrationExperimentEnabled.update {
litmusExperimentsUseCase
.execute(experimentName = LITMUS_EXPERIMENT_NAVIPAY_CHRISTMAS_CELEBRATION)
?.variant
?.enabled
.orFalse()
}
}
}
private fun executeSendMoney() {