TP-36163 | PS | fix no-order creation (#7735)
This commit is contained in:
@@ -217,8 +217,10 @@ class CheckerActivity : BasePaymentActivity() {
|
||||
}
|
||||
|
||||
override fun onBackPressed() {
|
||||
apiPollScheduler?.stopApiPoll()
|
||||
super.onBackPressed()
|
||||
if(isBackAllowed()) {
|
||||
apiPollScheduler?.stopApiPoll()
|
||||
super.onBackPressed()
|
||||
}
|
||||
}
|
||||
|
||||
private fun apiPollInit(
|
||||
@@ -579,6 +581,10 @@ class CheckerActivity : BasePaymentActivity() {
|
||||
return type == PENNY_DROP && actionData?.url.equals(REDIRECT_CTA)
|
||||
}
|
||||
|
||||
private fun isBackAllowed(): Boolean {
|
||||
return (type != PAYMENT_CALLBACK && type != PAYMENT_CALLBACK_SYNC)
|
||||
}
|
||||
|
||||
override fun getPaymentProcessingEventName() =
|
||||
if (type == PAYMENT_INIT
|
||||
|| type == PAYMENT_CALLBACK
|
||||
|
||||
@@ -276,6 +276,7 @@ class OtpFragment : AmcBaseFragment(), View.OnClickListener {
|
||||
putString(PaymentAnalytics.SYNC, PaymentAnalytics.TRUE)
|
||||
putString(PaymentAnalytics.PROVIDER, it.provider)
|
||||
}
|
||||
popThisFromBackStack()
|
||||
fragmentInterchangeListener?.navigateToNextScreen(ActionData(url = url), bundle)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ package com.navi.amc.common.viewmodel
|
||||
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.navi.common.utils.SingleLiveEvent
|
||||
import com.navi.common.viewmodel.BaseVM
|
||||
import com.navi.payment.model.PostPaymentData
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
@@ -16,7 +17,7 @@ import javax.inject.Inject
|
||||
@HiltViewModel
|
||||
class PaymentSharedVM @Inject constructor() : BaseVM() {
|
||||
|
||||
private val _postPaymentStatus = MutableLiveData<PostPaymentData?>()
|
||||
private val _postPaymentStatus = SingleLiveEvent<PostPaymentData?>()
|
||||
val postPaymentStatus: LiveData<PostPaymentData?>
|
||||
get() = _postPaymentStatus
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ class NewActionErrorFragment : BaseBottomSheet() {
|
||||
error?.actions?.getOrNull(1)?.url?.let{
|
||||
buttonListener?.invoke(it)
|
||||
} ?: run {
|
||||
openErrorCta(error?.actions?.firstOrNull())
|
||||
openErrorCta(error?.actions?.getOrNull(1))
|
||||
}
|
||||
}
|
||||
dismissDialog()
|
||||
|
||||
Reference in New Issue
Block a user