changed SendingToHost to Processing
This commit is contained in:
parent
ba24c60058
commit
6ddf0dda6c
@ -24,7 +24,7 @@ import com.mob.utsmyanmar.ui.print_receipt.PrintReceiptScreen
|
||||
import com.mob.utsmyanmar.ui.refund_rrn.InputRrnRoute
|
||||
import com.mob.utsmyanmar.ui.sign_on.SignOnResultScreen
|
||||
import com.mob.utsmyanmar.ui.sign_on.SignOnRoute
|
||||
import com.mob.utsmyanmar.ui.sending_to_host.SendingToHostRoute
|
||||
import com.mob.utsmyanmar.ui.sending_to_host.ProcessingRoute
|
||||
import com.mob.utsmyanmar.ui.settlement.SettlementScreen
|
||||
import com.mob.utsmyanmar.ui.transaction_result.TransactionResultRoute
|
||||
import com.mob.utsmyanmar.ui.sale_void.TranDetailPage
|
||||
@ -118,7 +118,7 @@ fun AppNavGraph(
|
||||
onBack = { navController.popBackStack() },
|
||||
onStartSettlement = {
|
||||
sharedViewModel.transactionsType.value = com.utsmyanmar.paylibs.utils.iso_utils.TransactionsType.SETTLEMENT
|
||||
navController.navigate(Routes.SendingToHost.route) {
|
||||
navController.navigate(Routes.Processing.route) {
|
||||
popUpTo(Routes.Settlement.route) {
|
||||
inclusive = true
|
||||
}
|
||||
@ -147,7 +147,7 @@ fun AppNavGraph(
|
||||
onProceedVoid = { payDetail ->
|
||||
sharedViewModel.transactionsType.value = com.utsmyanmar.paylibs.utils.iso_utils.TransactionsType.VOID
|
||||
sharedViewModel.payDetail.value = payDetail
|
||||
navController.navigate(Routes.SendingToHost.route) {
|
||||
navController.navigate(Routes.Processing.route) {
|
||||
popUpTo(Routes.VoidTranDetail.route) {
|
||||
inclusive = true
|
||||
}
|
||||
@ -320,8 +320,8 @@ fun AppNavGraph(
|
||||
launchSingleTop = true
|
||||
}
|
||||
},
|
||||
onNavigateSendingToHost = {
|
||||
navController.navigate(Routes.SendingToHost.route) {
|
||||
onNavigateProcessing = {
|
||||
navController.navigate(Routes.Processing.route) {
|
||||
popUpTo(Routes.PinPad.route) {
|
||||
inclusive = true
|
||||
}
|
||||
@ -338,8 +338,8 @@ fun AppNavGraph(
|
||||
InputRrnRoute(
|
||||
sharedViewModel = sharedViewModel,
|
||||
onBack = { navController.popBackStack() },
|
||||
onNavigateSendingToHost = {
|
||||
navController.navigate(Routes.SendingToHost.route) {
|
||||
onNavigateProcessing = {
|
||||
navController.navigate(Routes.Processing.route) {
|
||||
popUpTo(Routes.InputRrn.route) {
|
||||
inclusive = true
|
||||
}
|
||||
@ -349,14 +349,14 @@ fun AppNavGraph(
|
||||
)
|
||||
}
|
||||
|
||||
composable(Routes.SendingToHost.route) {
|
||||
composable(Routes.Processing.route) {
|
||||
val sharedViewModel: SharedViewModel = hiltViewModel(activity)
|
||||
|
||||
SendingToHostRoute(
|
||||
ProcessingRoute(
|
||||
sharedViewModel = sharedViewModel,
|
||||
onNavigateTransactionResult = {
|
||||
navController.navigate(Routes.TransactionResult.route) {
|
||||
popUpTo(Routes.SendingToHost.route) {
|
||||
popUpTo(Routes.Processing.route) {
|
||||
inclusive = true
|
||||
}
|
||||
launchSingleTop = true
|
||||
|
||||
@ -23,7 +23,7 @@ sealed class Routes(val route: String) {
|
||||
data object ProcessingCard : Routes("processing_card")
|
||||
data object PinPad : Routes("pin_pad")
|
||||
data object InputRrn : Routes("input_rrn")
|
||||
data object SendingToHost : Routes("sending_to_host")
|
||||
data object Processing : Routes("processing")
|
||||
data object TransactionResult : Routes("transaction_result")
|
||||
data object PrintReceipt : Routes("print_receipt")
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@ fun PinPadRoute(
|
||||
sharedViewModel: SharedViewModel,
|
||||
transProcessViewModel: TransProcessViewModel,
|
||||
onNavigateInputRrn: () -> Unit,
|
||||
onNavigateSendingToHost: () -> Unit,
|
||||
onNavigateProcessing: () -> Unit,
|
||||
onBack: () -> Unit
|
||||
) {
|
||||
val pinText by pinPadViewModel.pinText.collectAsStateWithLifecycle()
|
||||
@ -41,7 +41,7 @@ fun PinPadRoute(
|
||||
if (sharedViewModel.transactionsType.value == TransactionsType.REFUND) {
|
||||
onNavigateInputRrn()
|
||||
} else {
|
||||
onNavigateSendingToHost()
|
||||
onNavigateProcessing()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.saveable.rememberSaveable
|
||||
import androidx.compose.runtime.setValue
|
||||
import com.mob.utsmyanmar.ui.components.NumericEntryScreen
|
||||
import com.mob.utsmyanmar.ui.amount.NumericEntryScreen
|
||||
import com.mob.utsmyanmar.viewmodel.SharedViewModel
|
||||
import com.utsmyanmar.paylibs.utils.POSUtil
|
||||
|
||||
@ -15,7 +15,7 @@ private const val RRN_MAX_LENGTH = 12
|
||||
fun InputRrnRoute(
|
||||
sharedViewModel: SharedViewModel,
|
||||
onBack: () -> Unit,
|
||||
onNavigateSendingToHost: () -> Unit
|
||||
onNavigateProcessing: () -> Unit
|
||||
) {
|
||||
var rrn by rememberSaveable {
|
||||
mutableStateOf(sharedViewModel.rrNNo.value.orEmpty())
|
||||
@ -42,7 +42,7 @@ fun InputRrnRoute(
|
||||
payDetail.referNo = trimmedRrn
|
||||
sharedViewModel.payDetail.value = payDetail
|
||||
}
|
||||
onNavigateSendingToHost()
|
||||
onNavigateProcessing()
|
||||
},
|
||||
onKeyClick = { value ->
|
||||
rrn = appendRrnValue(rrn, value)
|
||||
|
||||
@ -8,7 +8,7 @@ import kotlinx.coroutines.delay
|
||||
private const val MOCK_HOST_DELAY_MS = 2000L
|
||||
|
||||
@Composable
|
||||
fun SendingToHostRoute(
|
||||
fun ProcessingRoute(
|
||||
sharedViewModel: SharedViewModel,
|
||||
onNavigateTransactionResult: () -> Unit
|
||||
) {
|
||||
@ -18,5 +18,5 @@ fun SendingToHostRoute(
|
||||
onNavigateTransactionResult()
|
||||
}
|
||||
|
||||
SendingToHostScreen()
|
||||
ProcessingScreen()
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ import com.mob.utsmyanmar.ui.theme.Primary
|
||||
import com.mob.utsmyanmar.ui.theme.White
|
||||
|
||||
@Composable
|
||||
fun SendingToHostScreen() {
|
||||
fun ProcessingScreen() {
|
||||
Scaffold(
|
||||
containerColor = White
|
||||
) { paddingValues ->
|
||||
@ -57,7 +57,7 @@ fun SendingToHostScreen() {
|
||||
Spacer(modifier = Modifier.height(20.dp))
|
||||
|
||||
Text(
|
||||
text = "Sending Data",
|
||||
text = "Processing",
|
||||
color = White,
|
||||
fontSize = 24.sp,
|
||||
fontWeight = FontWeight.Bold
|
||||
@ -66,7 +66,7 @@ fun SendingToHostScreen() {
|
||||
Spacer(modifier = Modifier.height(10.dp))
|
||||
|
||||
Text(
|
||||
text = "Please wait while we send transaction data to host.",
|
||||
text = "Please wait while your transaction is being processed.",
|
||||
color = White,
|
||||
fontSize = 15.sp,
|
||||
textAlign = TextAlign.Center
|
||||
@ -77,7 +77,7 @@ fun SendingToHostScreen() {
|
||||
Spacer(modifier = Modifier.height(24.dp))
|
||||
|
||||
Text(
|
||||
text = "Mock host communication in progress.",
|
||||
text = "Transaction processing in progress.",
|
||||
color = Black,
|
||||
fontSize = 14.sp,
|
||||
textAlign = TextAlign.Center
|
||||
|
||||
@ -347,12 +347,12 @@ public class ISOSocket {
|
||||
* If it is not secondary, go with primary
|
||||
*/
|
||||
if (!isSwitchIp) {
|
||||
serverIP = getIp();
|
||||
serverPort = getPort();
|
||||
// serverIP = getIp();
|
||||
// serverPort = getPort();
|
||||
// serverIP = "posuat.myanmarorientalbank.com";
|
||||
// serverPort = 5033;
|
||||
// serverIP = "10.255.255.195";
|
||||
// serverPort = 5555;
|
||||
serverIP = "192.168.100.9";
|
||||
serverPort = 5001;
|
||||
} else {
|
||||
isSwitchIp = false;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user