Compare commits
No commits in common. "68dd5eebd7bc9c61c992506c401bf0a78466bbc8" and "3301cb15e0ca55034afe91d950143b543405594e" have entirely different histories.
68dd5eebd7
...
3301cb15e0
@ -35,8 +35,6 @@ import com.mob.utsmyanmar.viewmodel.CardReaderViewModel
|
|||||||
import com.mob.utsmyanmar.viewmodel.EmvTransactionProcessViewModel
|
import com.mob.utsmyanmar.viewmodel.EmvTransactionProcessViewModel
|
||||||
import com.mob.utsmyanmar.ui.pinpad.PinPadViewModel
|
import com.mob.utsmyanmar.ui.pinpad.PinPadViewModel
|
||||||
import com.mob.utsmyanmar.ui.settlement.SettlementViewModel
|
import com.mob.utsmyanmar.ui.settlement.SettlementViewModel
|
||||||
import com.mob.utsmyanmar.ui.transaction_result.TransactionResultEvent
|
|
||||||
import com.mob.utsmyanmar.ui.transaction_result.TransactionResultViewModel
|
|
||||||
import com.mob.utsmyanmar.ui.version.VersionScreen
|
import com.mob.utsmyanmar.ui.version.VersionScreen
|
||||||
import com.mob.utsmyanmar.viewmodel.SharedViewModel
|
import com.mob.utsmyanmar.viewmodel.SharedViewModel
|
||||||
import com.mob.utsmyanmar.viewmodel.TransProcessViewModel
|
import com.mob.utsmyanmar.viewmodel.TransProcessViewModel
|
||||||
@ -399,9 +397,8 @@ fun AppNavGraph(
|
|||||||
|
|
||||||
composable(Routes.TransactionResult.route) {
|
composable(Routes.TransactionResult.route) {
|
||||||
val sharedViewModel: SharedViewModel = hiltViewModel(activity)
|
val sharedViewModel: SharedViewModel = hiltViewModel(activity)
|
||||||
val transResultViewModel: TransactionResultViewModel = hiltViewModel(activity)
|
|
||||||
TransactionResultRoute(
|
TransactionResultRoute(
|
||||||
viewModel = transResultViewModel,
|
|
||||||
sharedViewModel = sharedViewModel,
|
sharedViewModel = sharedViewModel,
|
||||||
onNavigateMain = {
|
onNavigateMain = {
|
||||||
navController.navigate(Routes.Dashboard.route) {
|
navController.navigate(Routes.Dashboard.route) {
|
||||||
@ -426,17 +423,8 @@ fun AppNavGraph(
|
|||||||
}
|
}
|
||||||
|
|
||||||
composable(Routes.PrintReceipt.route) {
|
composable(Routes.PrintReceipt.route) {
|
||||||
val sharedViewModel: SharedViewModel = hiltViewModel(activity)
|
|
||||||
val transResultViewModel: TransactionResultViewModel = hiltViewModel(activity)
|
|
||||||
PrintReceiptScreen(
|
PrintReceiptScreen(
|
||||||
sharedViewModel = sharedViewModel,
|
onPrint = {},
|
||||||
transactionResultViewModel = transResultViewModel,
|
|
||||||
onPrint = {
|
|
||||||
transResultViewModel.onEvent(
|
|
||||||
TransactionResultEvent.RetryPrint,
|
|
||||||
sharedViewModel
|
|
||||||
)
|
|
||||||
},
|
|
||||||
onDone = {
|
onDone = {
|
||||||
navController.navigate(Routes.Dashboard.route) {
|
navController.navigate(Routes.Dashboard.route) {
|
||||||
popUpTo(Routes.Dashboard.route) {
|
popUpTo(Routes.Dashboard.route) {
|
||||||
|
|||||||
@ -18,8 +18,6 @@ import androidx.compose.material3.OutlinedButton
|
|||||||
import androidx.compose.material3.Scaffold
|
import androidx.compose.material3.Scaffold
|
||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.LaunchedEffect
|
|
||||||
import androidx.compose.runtime.getValue
|
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
import androidx.compose.runtime.rememberCoroutineScope
|
import androidx.compose.runtime.rememberCoroutineScope
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
@ -31,35 +29,25 @@ import androidx.compose.ui.text.font.FontWeight
|
|||||||
import androidx.compose.ui.tooling.preview.Preview
|
import androidx.compose.ui.tooling.preview.Preview
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import androidx.hilt.navigation.compose.hiltViewModel
|
|
||||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
|
||||||
import com.mob.utsmyanmar.ui.components.appbar.AppBar
|
import com.mob.utsmyanmar.ui.components.appbar.AppBar
|
||||||
import com.mob.utsmyanmar.ui.theme.Color
|
import com.mob.utsmyanmar.ui.theme.Color
|
||||||
import com.mob.utsmyanmar.ui.transaction_result.TransactionResultEvent
|
|
||||||
import com.mob.utsmyanmar.ui.transaction_result.TransactionResultState
|
|
||||||
import com.mob.utsmyanmar.ui.transaction_result.TransactionResultViewModel
|
|
||||||
import com.mob.utsmyanmar.viewmodel.SharedViewModel
|
|
||||||
import com.utsmyanmar.paylibs.print.PrintReceipt
|
import com.utsmyanmar.paylibs.print.PrintReceipt
|
||||||
import com.utsmyanmar.paylibs.utils.POSUtil
|
|
||||||
|
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun PrintReceiptScreen(
|
fun PrintReceiptScreen(
|
||||||
transactionResultViewModel: TransactionResultViewModel,
|
|
||||||
sharedViewModel: SharedViewModel,
|
|
||||||
onPrint: () -> Unit,
|
onPrint: () -> Unit,
|
||||||
onDone: () -> Unit
|
onDone: () -> Unit
|
||||||
) {
|
) {
|
||||||
val state by transactionResultViewModel.state.collectAsStateWithLifecycle()
|
|
||||||
val scope = rememberCoroutineScope();
|
val scope = rememberCoroutineScope();
|
||||||
val receiptOffsetY = remember {
|
val receiptOffsetY = remember {
|
||||||
Animatable(0f);
|
Animatable(0f);
|
||||||
}
|
}
|
||||||
val animationDuration = 3000;
|
val animationDuration = 3000;
|
||||||
|
|
||||||
|
|
||||||
Scaffold(
|
Scaffold(
|
||||||
topBar = {
|
topBar = {
|
||||||
AppBar(title = "Receipt")
|
AppBar(title = "Receipt")
|
||||||
@ -76,7 +64,6 @@ fun PrintReceiptScreen(
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
ReceiptPreview(
|
ReceiptPreview(
|
||||||
state = state,
|
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.weight(1f)
|
.weight(1f)
|
||||||
.verticalScroll(rememberScrollState())
|
.verticalScroll(rememberScrollState())
|
||||||
@ -120,35 +107,35 @@ fun PrintReceiptScreen(
|
|||||||
),
|
),
|
||||||
shape = RoundedCornerShape(12.dp),
|
shape = RoundedCornerShape(12.dp),
|
||||||
onClick = {
|
onClick = {
|
||||||
onPrint()
|
// onPrint()
|
||||||
// try {
|
try {
|
||||||
// PrintReceipt.getInstance().printNow()
|
PrintReceipt.getInstance().printNow()
|
||||||
// scope.launch {
|
scope.launch {
|
||||||
// launch {
|
launch {
|
||||||
// receiptOffsetY.animateTo(
|
receiptOffsetY.animateTo(
|
||||||
// targetValue = -1500f,
|
targetValue = -1500f,
|
||||||
// animationSpec = tween(
|
animationSpec = tween(
|
||||||
// durationMillis = animationDuration,
|
durationMillis = animationDuration,
|
||||||
// easing = FastOutSlowInEasing
|
easing = FastOutSlowInEasing
|
||||||
// )
|
)
|
||||||
// )
|
)
|
||||||
// }
|
}
|
||||||
// delay(5000)
|
delay(5000)
|
||||||
// launch {
|
launch {
|
||||||
// receiptOffsetY.animateTo(
|
receiptOffsetY.animateTo(
|
||||||
// targetValue = 0f,
|
targetValue = 0f,
|
||||||
// animationSpec = tween(
|
animationSpec = tween(
|
||||||
// durationMillis = 0,
|
durationMillis = 0,
|
||||||
// easing = FastOutSlowInEasing
|
easing = FastOutSlowInEasing
|
||||||
// )
|
)
|
||||||
// )
|
)
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// } catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
//
|
|
||||||
// Log.d("PrintReceipt", "error with $e")
|
Log.d("PrintReceipt", "error with $e")
|
||||||
//
|
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
@ -168,7 +155,6 @@ fun PrintReceiptScreen(
|
|||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun ReceiptPreview(
|
fun ReceiptPreview(
|
||||||
state: TransactionResultState,
|
|
||||||
modifier: Modifier = Modifier
|
modifier: Modifier = Modifier
|
||||||
) {
|
) {
|
||||||
Column(
|
Column(
|
||||||
@ -198,16 +184,16 @@ fun ReceiptPreview(
|
|||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(16.dp))
|
Spacer(modifier = Modifier.height(16.dp))
|
||||||
ReceiptDivider()
|
ReceiptDivider()
|
||||||
ReceiptRow("Merchant", state.payDetail?.merchantName.toString() )
|
ReceiptRow("Merchant", "MOB UTS Myanmar")
|
||||||
ReceiptRow("Terminal ID", state.payDetail?.terminalNo.toString() )
|
ReceiptRow("Terminal ID", "POS001")
|
||||||
ReceiptRow("Transaction", state.payDetail?.transType.toString())
|
ReceiptRow("Transaction", "SALE")
|
||||||
ReceiptRow("Amount", POSUtil.getInstance().getDecimalAmountSeparatorFormat(state.payDetail?.amount?:0))
|
ReceiptRow("Amount", "500.00 MMK")
|
||||||
ReceiptRow("Card Type", state.payDetail?.accountType.toString())
|
ReceiptRow("Card Type", "MPU")
|
||||||
ReceiptRow("Card No", state.payDetail?.cardNo.toString())
|
ReceiptRow("Card No", "1234 **** **** 5678")
|
||||||
ReceiptRow("Status", POSUtil.getInstance().getResponse(state.payDetail?.tradeAnswerCode?: "-"))
|
ReceiptRow("Status", "SUCCESS")
|
||||||
ReceiptRow("Date", state.payDetail?.transDate.toString() )
|
ReceiptRow("Date", "13/05/2026")
|
||||||
ReceiptRow("Time", state.payDetail?.transTime.toString())
|
ReceiptRow("Time", "14:30:22")
|
||||||
ReceiptRow("Ref No", state.payDetail?.referNo.toString())
|
ReceiptRow("Ref No", "REF123456789")
|
||||||
ReceiptDivider()
|
ReceiptDivider()
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(8.dp))
|
||||||
Text(
|
Text(
|
||||||
@ -271,8 +257,6 @@ fun ReceiptDivider() {
|
|||||||
fun PreviewPrintReceiptScreen() {
|
fun PreviewPrintReceiptScreen() {
|
||||||
MaterialTheme {
|
MaterialTheme {
|
||||||
PrintReceiptScreen(
|
PrintReceiptScreen(
|
||||||
sharedViewModel = hiltViewModel(),
|
|
||||||
transactionResultViewModel = hiltViewModel(),
|
|
||||||
onPrint = {},
|
onPrint = {},
|
||||||
onDone = {}
|
onDone = {}
|
||||||
)
|
)
|
||||||
|
|||||||
@ -99,7 +99,7 @@ class SettlementViewModel @Inject constructor(
|
|||||||
private val isoMsgX: ISOMsgX =
|
private val isoMsgX: ISOMsgX =
|
||||||
ISOMsgX.ISOMsgXBuilder(
|
ISOMsgX.ISOMsgXBuilder(
|
||||||
ISOVersion.VERSION_1993,
|
ISOVersion.VERSION_1993,
|
||||||
ISOMode.ONLY_HEADER,
|
ISOMode.BOTH_HEADER_TPDU,
|
||||||
HostName.MPU
|
HostName.MPU
|
||||||
).build()
|
).build()
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import com.utsmyanmar.paylibs.utils.iso_utils.TransactionsType
|
|||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun TransactionResultRoute(
|
fun TransactionResultRoute(
|
||||||
viewModel: TransactionResultViewModel,
|
viewModel: TransactionResultViewModel = hiltViewModel(),
|
||||||
sharedViewModel: SharedViewModel,
|
sharedViewModel: SharedViewModel,
|
||||||
onNavigateMain: () -> Unit,
|
onNavigateMain: () -> Unit,
|
||||||
onNavigatePrintReceipt: () -> Unit,
|
onNavigatePrintReceipt: () -> Unit,
|
||||||
|
|||||||
@ -26,7 +26,6 @@ import com.mob.utsmyanmar.ui.preview.P2Preview
|
|||||||
import com.mob.utsmyanmar.ui.theme.Color
|
import com.mob.utsmyanmar.ui.theme.Color
|
||||||
import com.utsmyanmar.paylibs.model.PayDetail
|
import com.utsmyanmar.paylibs.model.PayDetail
|
||||||
import com.utsmyanmar.paylibs.print.PrintReceipt
|
import com.utsmyanmar.paylibs.print.PrintReceipt
|
||||||
import com.utsmyanmar.paylibs.utils.POSUtil
|
|
||||||
|
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
@ -77,7 +76,7 @@ fun TransactionResultScreen(
|
|||||||
|
|
||||||
Spacer(modifier = Modifier.height(28.dp))
|
Spacer(modifier = Modifier.height(28.dp))
|
||||||
|
|
||||||
AmountCard(amount = POSUtil.getInstance().getDecimalAmountSeparatorFormat(state.payDetail?.amount?:0))
|
AmountCard(amount = state.payDetail?.amount.toString())
|
||||||
|
|
||||||
Spacer(modifier = Modifier.height(16.dp))
|
Spacer(modifier = Modifier.height(16.dp))
|
||||||
|
|
||||||
|
|||||||
@ -27,8 +27,8 @@ public final class TerminalKeyUtil {
|
|||||||
byte[] pik_kcv;
|
byte[] pik_kcv;
|
||||||
|
|
||||||
SecurityOptV2 mSecurityOptV2 = BaseApplication.getInstance().mSecurityOptV2;
|
SecurityOptV2 mSecurityOptV2 = BaseApplication.getInstance().mSecurityOptV2;
|
||||||
byte[] cvByte = ByteUtil.hexStr2Bytes("B7B520");
|
byte[] cvByte = ByteUtil.hexStr2Bytes("60430856F15FAE51");
|
||||||
byte[] dataByte = ByteUtil.hexStr2Bytes("e121249099a677e8b7d4f6a9d49fe8d1".toUpperCase());
|
byte[] dataByte = ByteUtil.hexStr2Bytes("170003A44E7D5366FECD4731D9BD4E49");
|
||||||
|
|
||||||
byte[] makBytes = ByteUtil.hexStr2Bytes("250738083EC15BD3BA67D66B8A7AA13B");
|
byte[] makBytes = ByteUtil.hexStr2Bytes("250738083EC15BD3BA67D66B8A7AA13B");
|
||||||
// byte[] makCvBytes = ByteUtil.hexStr2Bytes("204E449B97");
|
// byte[] makCvBytes = ByteUtil.hexStr2Bytes("204E449B97");
|
||||||
@ -48,7 +48,7 @@ public final class TerminalKeyUtil {
|
|||||||
if(!SystemParamsOperation.getInstance().isInjectOnce()) {
|
if(!SystemParamsOperation.getInstance().isInjectOnce()) {
|
||||||
try {
|
try {
|
||||||
// result = mSecurityOptV2.saveKeyDukpt(AidlConstantsV2.Security.KEY_TYPE_DUPKT_IPEK,IPEKByte,IPEKKCVByte,KSNByte,AidlConstantsV2.Security.KEY_ALG_TYPE_3DES,9);
|
// result = mSecurityOptV2.saveKeyDukpt(AidlConstantsV2.Security.KEY_TYPE_DUPKT_IPEK,IPEKByte,IPEKKCVByte,KSNByte,AidlConstantsV2.Security.KEY_ALG_TYPE_3DES,9);
|
||||||
result = mSecurityOptV2.savePlaintextKey(AidlConstantsV2.Security.KEY_TYPE_TMK,dataByte,cvByte,AidlConstantsV2.Security.KEY_ALG_TYPE_3DES,9);
|
result = mSecurityOptV2.savePlaintextKey(AidlConstantsV2.Security.KEY_TYPE_TMK,IPEKByte,IPEKKCVByte,AidlConstantsV2.Security.KEY_ALG_TYPE_3DES,9);
|
||||||
LogUtil.d(ContentValues.TAG, "save TMK result:" + result);
|
LogUtil.d(ContentValues.TAG, "save TMK result:" + result);
|
||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
LogUtil.d(TAG, "save TMK fail");
|
LogUtil.d(TAG, "save TMK fail");
|
||||||
|
|||||||
@ -18,7 +18,7 @@ public abstract class BaseISOMsgX {
|
|||||||
byte[] newSendBytes = EncodePackage.assembly(map, msgIdentifier, 0, "0000000000",hostName);
|
byte[] newSendBytes = EncodePackage.assembly(map, msgIdentifier, 0, "0000000000",hostName);
|
||||||
|
|
||||||
// String BPCTPDU = "6003550000";
|
// String BPCTPDU = "6003550000";
|
||||||
String MOBTPDU = "6005170000";
|
String MOBTPDU = "6030303030";
|
||||||
|
|
||||||
if(isoMode == ISOMode.BOTH_HEADER_TPDU) {
|
if(isoMode == ISOMode.BOTH_HEADER_TPDU) {
|
||||||
byte[] outBytes = new byte[newSendBytes.length - 6 ];
|
byte[] outBytes = new byte[newSendBytes.length - 6 ];
|
||||||
|
|||||||
@ -148,7 +148,7 @@ public class ISOSocket {
|
|||||||
private SSLSocketFactory getSSLSocketFactory()
|
private SSLSocketFactory getSSLSocketFactory()
|
||||||
throws CertificateException, KeyStoreException, IOException, NoSuchAlgorithmException, KeyManagementException {
|
throws CertificateException, KeyStoreException, IOException, NoSuchAlgorithmException, KeyManagementException {
|
||||||
CertificateFactory cf = CertificateFactory.getInstance("X.509");
|
CertificateFactory cf = CertificateFactory.getInstance("X.509");
|
||||||
InputStream caInput = context.getResources().openRawResource(R.raw.mpu_crt_2026); // this cert file stored in \app\src\main\res\raw folder path
|
InputStream caInput = context.getResources().openRawResource(R.raw.mob_uat); // this cert file stored in \app\src\main\res\raw folder path
|
||||||
|
|
||||||
Certificate ca = cf.generateCertificate(caInput);
|
Certificate ca = cf.generateCertificate(caInput);
|
||||||
caInput.close();
|
caInput.close();
|
||||||
@ -175,7 +175,7 @@ public class ISOSocket {
|
|||||||
private OkHttpClient getClient()
|
private OkHttpClient getClient()
|
||||||
throws CertificateException, KeyStoreException, IOException, NoSuchAlgorithmException, KeyManagementException {
|
throws CertificateException, KeyStoreException, IOException, NoSuchAlgorithmException, KeyManagementException {
|
||||||
CertificateFactory cf = CertificateFactory.getInstance("X.509");
|
CertificateFactory cf = CertificateFactory.getInstance("X.509");
|
||||||
InputStream caInput = context.getResources().openRawResource(R.raw.mpu_crt_2026); // this cert file stored in \app\src\main\res\raw folder path
|
InputStream caInput = context.getResources().openRawResource(R.raw.mob_uat); // this cert file stored in \app\src\main\res\raw folder path
|
||||||
|
|
||||||
Certificate ca = cf.generateCertificate(caInput);
|
Certificate ca = cf.generateCertificate(caInput);
|
||||||
caInput.close();
|
caInput.close();
|
||||||
@ -331,10 +331,8 @@ public class ISOSocket {
|
|||||||
isSwitchIp = true;
|
isSwitchIp = true;
|
||||||
// serverIP = "posuat.myanmarorientalbank.com";
|
// serverIP = "posuat.myanmarorientalbank.com";
|
||||||
// serverPort = 5033;
|
// serverPort = 5033;
|
||||||
// serverIP = "192.168.0.100";
|
serverIP = "192.168.0.100";
|
||||||
// serverPort = 5001;
|
serverPort = 5001;
|
||||||
serverIP = "103.84.101.82";
|
|
||||||
serverPort = 60147;
|
|
||||||
// serverIP = getSecondaryIp();
|
// serverIP = getSecondaryIp();
|
||||||
// serverPort = getSecondaryPort();
|
// serverPort = getSecondaryPort();
|
||||||
}
|
}
|
||||||
@ -355,10 +353,8 @@ public class ISOSocket {
|
|||||||
if (!isSwitchIp) {
|
if (!isSwitchIp) {
|
||||||
// serverIP = getIp();
|
// serverIP = getIp();
|
||||||
// serverPort = getPort();
|
// serverPort = getPort();
|
||||||
// serverIP = "192.168.0.100";
|
serverIP = "192.168.0.100";
|
||||||
// serverPort = 5001;
|
serverPort = 5001;
|
||||||
serverIP = "103.84.101.82";
|
|
||||||
serverPort = 60147;
|
|
||||||
SystemParamsOperation.getInstance().setSslSwitchStatus(false);
|
SystemParamsOperation.getInstance().setSslSwitchStatus(false);
|
||||||
// serverIP = "posuat.myanmarorientalbank.com";
|
// serverIP = "posuat.myanmarorientalbank.com";
|
||||||
// serverPort = 5033;
|
// serverPort = 5033;
|
||||||
|
|||||||
@ -58,14 +58,14 @@ public class PrintXImpl extends BaseXPrint implements PrintX {
|
|||||||
opts.inJustDecodeBounds = true;
|
opts.inJustDecodeBounds = true;
|
||||||
|
|
||||||
// Step 1: Only read dimensions first
|
// Step 1: Only read dimensions first
|
||||||
BitmapFactory.decodeResource(resources, R.drawable.print_logo_mpu, opts);
|
BitmapFactory.decodeResource(resources, R.drawable.primary_print_logo_yoma_bank, opts);
|
||||||
|
|
||||||
// Step 2: Calculate sample size so width <= 384px
|
// Step 2: Calculate sample size so width <= 384px
|
||||||
opts.inSampleSize = calculateInSampleSize(opts, 384, 384);
|
opts.inSampleSize = calculateInSampleSize(opts, 384, 384);
|
||||||
opts.inJustDecodeBounds = false;
|
opts.inJustDecodeBounds = false;
|
||||||
|
|
||||||
// Step 3: Decode scaled-down bitmap
|
// Step 3: Decode scaled-down bitmap
|
||||||
bitmap = BitmapFactory.decodeResource(resources, R.drawable.print_logo_mpu, opts);
|
bitmap = BitmapFactory.decodeResource(resources, R.drawable.primary_print_logo_yoma_bank, opts);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -53,7 +53,7 @@ public class ReversalAction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private ReversalAction() {
|
private ReversalAction() {
|
||||||
isoMsgX = new ISOMsgX.ISOMsgXBuilder(ISOVersion.VERSION_1993, ISOMode.ONLY_HEADER,HostName.MPU)
|
isoMsgX = new ISOMsgX.ISOMsgXBuilder(ISOVersion.VERSION_1993, ISOMode.BOTH_HEADER_TPDU,HostName.BPC)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -50,7 +50,7 @@ public class SignOnProcess {
|
|||||||
private SignOnProcess() {
|
private SignOnProcess() {
|
||||||
tradeData = Params.newTrade(true);
|
tradeData = Params.newTrade(true);
|
||||||
// payDetail = tradeData.getPayDetail();
|
// payDetail = tradeData.getPayDetail();
|
||||||
isoMsgX = new ISOMsgX.ISOMsgXBuilder(ISOVersion.VERSION_1993, ISOMode.ONLY_HEADER,HostName.MPU)
|
isoMsgX = new ISOMsgX.ISOMsgXBuilder(ISOVersion.VERSION_1993, ISOMode.BOTH_HEADER_TPDU,HostName.MPU)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ public class SignOnProcess {
|
|||||||
payDetail.setTransactionType(TransactionsType.SIGN_ON.value);
|
payDetail.setTransactionType(TransactionsType.SIGN_ON.value);
|
||||||
payDetail.setHostName(hostName.name);
|
payDetail.setHostName(hostName.name);
|
||||||
|
|
||||||
byte[] sendBytes = isoMsgX.buildISOPackets(tradeData, BitmapConfig.MPU_NEW_SIGN_ON, MessageType.NETWORK_MANAGEMENT);
|
byte[] sendBytes = isoMsgX.buildISOPackets(tradeData, BitmapConfig.CZ_SIGN_ON, MessageType.NETWORK_MANAGEMENT);
|
||||||
ISOSocket.getInstance().enqueue(sendBytes, sendBytes.length,false, new ISOCallback() {
|
ISOSocket.getInstance().enqueue(sendBytes, sendBytes.length,false, new ISOCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(byte[] bytes, int length) {
|
public void onReceive(byte[] bytes, int length) {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -177,10 +177,6 @@ public class POSUtil {
|
|||||||
return BaseErrorCode.convert93to87(responseCode);
|
return BaseErrorCode.convert93to87(responseCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getResponse(String responseCode) {
|
|
||||||
return BaseErrorCode.getCode(responseCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCardType(PayDetail payDetail) {
|
public String getCardType(PayDetail payDetail) {
|
||||||
int value = 0;
|
int value = 0;
|
||||||
|
|
||||||
|
|||||||
@ -3,19 +3,19 @@ package com.utsmyanmar.paylibs.utils.iso_utils;
|
|||||||
public enum TransactionsType {
|
public enum TransactionsType {
|
||||||
SALE("SALE",1,"000000"),
|
SALE("SALE",1,"000000"),
|
||||||
|
|
||||||
VOID("VOID SALE",2,"020000"), //200000
|
VOID("VOID SALE",2,"200000"), //020000
|
||||||
|
|
||||||
SETTLEMENT("SETTLEMENT",3,"920000"),
|
SETTLEMENT("SETTLEMENT",3,"920000"),
|
||||||
|
|
||||||
REFUND("REFUND",4,"200000"),
|
REFUND("REFUND",4,"200000"),
|
||||||
|
|
||||||
PRE_AUTH_SALE("PRE-AUTH",5,"300000"), //930000
|
PRE_AUTH_SALE("PRE-AUTH",5,"930000"),
|
||||||
|
|
||||||
PRE_AUTH_VOID("PREAUTH CANCELLATION",6,"020000"),
|
PRE_AUTH_VOID("PREAUTH CANCELLATION",6,"200000"),
|
||||||
|
|
||||||
PRE_AUTH_COMPLETE("PREAUTH COMPLETION",7,"000000"), //940000
|
PRE_AUTH_COMPLETE("PREAUTH COMPLETION",7,"940000"),
|
||||||
|
|
||||||
PRE_AUTH_COMPLETE_VOID("VOID PREAUTH COMPLETE",8,"000000"), //940000
|
PRE_AUTH_COMPLETE_VOID("VOID PREAUTH COMPLETE",8,"940000"),
|
||||||
CASH_OUT("CASH_OUT",9,"010000"),
|
CASH_OUT("CASH_OUT",9,"010000"),
|
||||||
|
|
||||||
REVERSAL("REVERSAL",10,"00"),
|
REVERSAL("REVERSAL",10,"00"),
|
||||||
|
|||||||
@ -106,11 +106,8 @@ public class Params {
|
|||||||
|
|
||||||
// mock tid,mid
|
// mock tid,mid
|
||||||
|
|
||||||
// payDetail.setTerminalNo("00000003");
|
payDetail.setTerminalNo("00000003");
|
||||||
// payDetail.setMerchantNo("777031200000001");
|
payDetail.setMerchantNo("777031200000001");
|
||||||
// mpu
|
|
||||||
payDetail.setTerminalNo("10040018");
|
|
||||||
payDetail.setMerchantNo("110400000000006");
|
|
||||||
|
|
||||||
// 4, Nov ,2024
|
// 4, Nov ,2024
|
||||||
payDetail.setTransCVM(TransCVM.NO_CVM);
|
payDetail.setTransCVM(TransCVM.NO_CVM);
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 54 KiB |
@ -1,23 +0,0 @@
|
|||||||
-----BEGIN CERTIFICATE-----
|
|
||||||
MIID3DCCAsSgAwIBAgIJAIuL4ypXInCoMA0GCSqGSIb3DQEBBQUAMGcxCzAJBgNV
|
|
||||||
BAYTAk1SMQswCQYDVQQIDAJNUjEMMAoGA1UECgwDTVBVMQwwCgYDVQQLDANNUFUx
|
|
||||||
DTALBgNVBAMMBHRlc3QxIDAeBgkqhkiG9w0BCQEWEXdhaXlhbkBmcHQuY29tLnZu
|
|
||||||
MB4XDTIxMDIwMzE3MTExMloXDTIyMDIwMzE3MTExMlowdzELMAkGA1UEBhMCTVIx
|
|
||||||
DzANBgNVBAgMBllhbmdvbjEPMA0GA1UEBwwGWWFuZ29uMQwwCgYDVQQKDANNUFUx
|
|
||||||
DDAKBgNVBAsMA01QVTENMAsGA1UEAwwEdGVzdDEbMBkGCSqGSIb3DQEJARYMdGVz
|
|
||||||
dEBtcHUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAujLe6mWJ
|
|
||||||
GXliGUoLdJEA37VyBOQ7zLpge7u2QM2UMQXnKosdtZzMzXnVrnctJ6ehzLnhL0Lv
|
|
||||||
Oissr7qo53haXsJJccHeqcTH5cFkh96IswOrc8/1MMrb4zMjnNjOZaxmB4HeGHKk
|
|
||||||
KjNLKTTO8It3v/MziBhxUEEKVrN4npeUfsGVPfrvYnZXSWuRLhzYYLtEz/LFg4Yh
|
|
||||||
28pCXqk2vmGNV62oZ2+SDisoiYdIVEOMRqb/7cJg+cd0JRdvxHsTNuYRHGtJOM10
|
|
||||||
lEnoI+moE5OIUpp8Z+i4ZcvyThpNbRWf9sRzB8oc32fZ2UWnlN5+bVRLCjlk2jNO
|
|
||||||
SGdMuMaF0bs3GwIDAQABo3sweTAJBgNVHRMEAjAAMCwGCWCGSAGG+EIBDQQfFh1P
|
|
||||||
cGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZpY2F0ZTAdBgNVHQ4EFgQUipyzRYfqRc2P
|
|
||||||
QCJ0FJp6eAvI1wkwHwYDVR0jBBgwFoAUvYEAOtcvUt4CxCp+9zRG2oJqos8wDQYJ
|
|
||||||
KoZIhvcNAQEFBQADggEBAAjBQroy74ACyyJCZJ50KBTYQI3Sk82hO/+zZFqsJgWm
|
|
||||||
mNum31TtfwhvQmi94sXQSar0UsqLTmLC3UTucwEdSKOPzXF5BK4EEbkYgMm78hNK
|
|
||||||
2zqhGvcWlqun+KPxmnMRFoVmN3Ck2PkcgudvAeV0G3rm0OdLUwLoK2TcREVf1Cwg
|
|
||||||
C7jX5QtGOgVqnKDZBuoSvdbV30ka7pKkdJAy/Wus4N9hHH+bR2FNkLgTDoXnV8LL
|
|
||||||
E2dRKVYAh9TtuXiW/ejhPtEc14sMP+8JpCFX3DYx4yRW8ZeMl5jal4LhRFXdDbVl
|
|
||||||
Wm99KcWM+TNw/nzKwv0zUJXy0HlN82tvLX1/wbBUo8M=
|
|
||||||
-----END CERTIFICATE-----
|
|
||||||
Loading…
Reference in New Issue
Block a user