MPU certification in progress
This commit is contained in:
parent
8e6fde9856
commit
4fefae3646
@ -349,7 +349,15 @@ fun AppNavGraph(
|
|||||||
launchSingleTop = true
|
launchSingleTop = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onBack = { navController.popBackStack() }
|
onBack = { navController.popBackStack() },
|
||||||
|
onNavigateMain = {
|
||||||
|
navController.navigate(Routes.Dashboard.route) {
|
||||||
|
popUpTo(Routes.Dashboard.route) {
|
||||||
|
inclusive = false
|
||||||
|
}
|
||||||
|
launchSingleTop = true
|
||||||
|
}
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,8 @@ fun PinPadRoute(
|
|||||||
transProcessViewModel: TransProcessViewModel,
|
transProcessViewModel: TransProcessViewModel,
|
||||||
onNavigateInputRrn: () -> Unit,
|
onNavigateInputRrn: () -> Unit,
|
||||||
onNavigateProcessing: () -> Unit,
|
onNavigateProcessing: () -> Unit,
|
||||||
onBack: () -> Unit
|
onBack: () -> Unit,
|
||||||
|
onNavigateMain: () -> Unit,
|
||||||
) {
|
) {
|
||||||
val pinText by pinPadViewModel.pinText.collectAsStateWithLifecycle()
|
val pinText by pinPadViewModel.pinText.collectAsStateWithLifecycle()
|
||||||
val alertMsg by pinPadViewModel.alertMsg.collectAsStateWithLifecycle()
|
val alertMsg by pinPadViewModel.alertMsg.collectAsStateWithLifecycle()
|
||||||
@ -67,6 +68,9 @@ fun PinPadRoute(
|
|||||||
onBack()
|
onBack()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PinPadStatus.ON_ERROR -> {
|
||||||
|
onNavigateMain()
|
||||||
|
}
|
||||||
else -> {}
|
else -> {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,14 +41,22 @@ fun ProcessingRoute(
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LaunchedEffect(Unit) {
|
LaunchedEffect(Unit) {
|
||||||
|
transProcessViewModel.resetTransactionStatus()
|
||||||
transProcessViewModel.startOnlineProcess()
|
transProcessViewModel.startOnlineProcess()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LaunchedEffect(transStatus) {
|
LaunchedEffect(transStatus) {
|
||||||
when(transStatus) {
|
when(transStatus) {
|
||||||
TransResultStatus.SUCCESS -> onNavigateTransactionResult()
|
TransResultStatus.SUCCESS -> {
|
||||||
TransResultStatus.FAIL -> onNavigateTransactionResult()
|
sharedViewModel.payDetail.value = transProcessViewModel.payDetailResult.value
|
||||||
|
onNavigateTransactionResult()
|
||||||
|
}
|
||||||
|
|
||||||
|
TransResultStatus.FAIL -> {
|
||||||
|
sharedViewModel.payDetail.value = transProcessViewModel.payDetailResult.value
|
||||||
|
onNavigateTransactionResult()
|
||||||
|
}
|
||||||
TransResultStatus.REVERSAL_SUCCESS -> onNavigateMain()
|
TransResultStatus.REVERSAL_SUCCESS -> onNavigateMain()
|
||||||
TransResultStatus.REVERSAL_FAIL -> onNavigateMain()
|
TransResultStatus.REVERSAL_FAIL -> onNavigateMain()
|
||||||
else -> {}
|
else -> {}
|
||||||
|
|||||||
@ -92,6 +92,7 @@ class SettlementViewModel @Inject constructor(
|
|||||||
init {
|
init {
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
records.asFlow().collect { list ->
|
records.asFlow().collect { list ->
|
||||||
|
setPayDetails(list)
|
||||||
setSettlementData(list)
|
setSettlementData(list)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.mob.utsmyanmar.ui.transaction_result
|
package com.mob.utsmyanmar.ui.transaction_result
|
||||||
|
|
||||||
|
import android.R
|
||||||
import androidx.activity.compose.BackHandler
|
import androidx.activity.compose.BackHandler
|
||||||
import androidx.compose.foundation.BorderStroke
|
import androidx.compose.foundation.BorderStroke
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
@ -12,6 +13,7 @@ import androidx.compose.material.icons.filled.CalendarMonth
|
|||||||
import androidx.compose.material.icons.filled.Numbers
|
import androidx.compose.material.icons.filled.Numbers
|
||||||
import androidx.compose.material.icons.filled.Print
|
import androidx.compose.material.icons.filled.Print
|
||||||
import androidx.compose.material.icons.rounded.Check
|
import androidx.compose.material.icons.rounded.Check
|
||||||
|
import androidx.compose.material.icons.rounded.Close
|
||||||
import androidx.compose.material3.*
|
import androidx.compose.material3.*
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
@ -55,7 +57,8 @@ fun TransactionResultScreen(
|
|||||||
|
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(8.dp))
|
||||||
|
|
||||||
SuccessIcon()
|
if(state.payDetail?.tradeAnswerCode.equals("00")) SuccessIcon()
|
||||||
|
else FailIcon()
|
||||||
|
|
||||||
Spacer(modifier = Modifier.height(16.dp))
|
Spacer(modifier = Modifier.height(16.dp))
|
||||||
|
|
||||||
@ -115,6 +118,7 @@ private fun SuccessIcon() {
|
|||||||
),
|
),
|
||||||
contentAlignment = Alignment.Center
|
contentAlignment = Alignment.Center
|
||||||
) {
|
) {
|
||||||
|
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Rounded.Check,
|
imageVector = Icons.Rounded.Check,
|
||||||
contentDescription = "Success",
|
contentDescription = "Success",
|
||||||
@ -125,6 +129,42 @@ private fun SuccessIcon() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
private fun FailIcon() {
|
||||||
|
Box(
|
||||||
|
modifier = Modifier.size(132.dp),
|
||||||
|
contentAlignment = Alignment.Center
|
||||||
|
) {
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.size(132.dp)
|
||||||
|
.background(
|
||||||
|
color = Color.Error.copy(alpha = 0.12f),
|
||||||
|
shape = CircleShape
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.size(96.dp)
|
||||||
|
.background(
|
||||||
|
color = Color.Error,
|
||||||
|
shape = CircleShape
|
||||||
|
),
|
||||||
|
contentAlignment = Alignment.Center
|
||||||
|
) {
|
||||||
|
|
||||||
|
Icon(
|
||||||
|
imageVector = Icons.Rounded.Close,
|
||||||
|
contentDescription = "Failed",
|
||||||
|
tint = Color.White,
|
||||||
|
modifier = Modifier.size(64.dp)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
private fun AmountCard(
|
private fun AmountCard(
|
||||||
amount: String
|
amount: String
|
||||||
|
|||||||
@ -51,7 +51,10 @@ class TransactionResultViewModel @Inject constructor(
|
|||||||
sharedViewModel: SharedViewModel
|
sharedViewModel: SharedViewModel
|
||||||
) {
|
) {
|
||||||
when (event) {
|
when (event) {
|
||||||
TransactionResultEvent.Start -> start(sharedViewModel)
|
TransactionResultEvent.Start -> {
|
||||||
|
started = false
|
||||||
|
start(sharedViewModel)
|
||||||
|
}
|
||||||
TransactionResultEvent.BackClick -> isCardInside()
|
TransactionResultEvent.BackClick -> isCardInside()
|
||||||
TransactionResultEvent.RetryPrint -> startPrintProcess(sharedViewModel, false)
|
TransactionResultEvent.RetryPrint -> startPrintProcess(sharedViewModel, false)
|
||||||
TransactionResultEvent.PrintLater -> isCardInside()
|
TransactionResultEvent.PrintLater -> isCardInside()
|
||||||
@ -59,6 +62,7 @@ class TransactionResultViewModel @Inject constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun start(sharedViewModel: SharedViewModel) {
|
private fun start(sharedViewModel: SharedViewModel) {
|
||||||
|
|
||||||
if (started) return
|
if (started) return
|
||||||
started = true
|
started = true
|
||||||
|
|
||||||
|
|||||||
@ -62,6 +62,10 @@ class TransProcessViewModel @Inject constructor(
|
|||||||
_transType.value = type
|
_transType.value = type
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun resetTransactionResultStatus() {
|
||||||
|
_transResultStatus.value = null
|
||||||
|
}
|
||||||
|
|
||||||
private val _printStatus =
|
private val _printStatus =
|
||||||
MutableStateFlow(PrintStatus.FIRST_PRINT)
|
MutableStateFlow(PrintStatus.FIRST_PRINT)
|
||||||
|
|
||||||
|
|||||||
@ -45,6 +45,7 @@ public final class TerminalKeyUtil {
|
|||||||
|
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
|
||||||
|
SystemParamsOperation.getInstance().setTMKIndex("9");
|
||||||
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);
|
||||||
|
|||||||
@ -493,6 +493,11 @@ public class ISOSocket {
|
|||||||
int len = -1;
|
int len = -1;
|
||||||
if (reversalTestCaseFlag) {
|
if (reversalTestCaseFlag) {
|
||||||
len = inputStream.read(recBuff);
|
len = inputStream.read(recBuff);
|
||||||
|
} else {
|
||||||
|
int lenn = inputStream.read(recBuff);
|
||||||
|
|
||||||
|
String received = ByteUtil.bytes2HexStr(recBuff);
|
||||||
|
LogUtil.d(TAG,"Received Response :"+received);
|
||||||
}
|
}
|
||||||
|
|
||||||
rLen = len;
|
rLen = len;
|
||||||
@ -544,6 +549,11 @@ public class ISOSocket {
|
|||||||
int len = -1;
|
int len = -1;
|
||||||
if (reversalTestCaseFlag) {
|
if (reversalTestCaseFlag) {
|
||||||
len = inputStream.read(recBuff);
|
len = inputStream.read(recBuff);
|
||||||
|
} else {
|
||||||
|
int lenn = inputStream.read(recBuff);
|
||||||
|
|
||||||
|
String received = ByteUtil.bytes2HexStr(recBuff);
|
||||||
|
LogUtil.d(TAG,"Received Response :"+received);
|
||||||
}
|
}
|
||||||
|
|
||||||
rLen = len;
|
rLen = len;
|
||||||
|
|||||||
@ -16,7 +16,6 @@ import com.utsmyanmar.paylibs.network.ISOCallback;
|
|||||||
import com.utsmyanmar.paylibs.network.ISOSocket;
|
import com.utsmyanmar.paylibs.network.ISOSocket;
|
||||||
import com.utsmyanmar.paylibs.utils.MessageType;
|
import com.utsmyanmar.paylibs.utils.MessageType;
|
||||||
import com.utsmyanmar.paylibs.utils.core_utils.SystemParamsOperation;
|
import com.utsmyanmar.paylibs.utils.core_utils.SystemParamsOperation;
|
||||||
import com.utsmyanmar.paylibs.utils.enums.CardScheme;
|
|
||||||
import com.utsmyanmar.paylibs.utils.enums.HostName;
|
import com.utsmyanmar.paylibs.utils.enums.HostName;
|
||||||
import com.utsmyanmar.paylibs.utils.iso_utils.BitmapConfig;
|
import com.utsmyanmar.paylibs.utils.iso_utils.BitmapConfig;
|
||||||
import com.utsmyanmar.paylibs.utils.iso_utils.TransactionType;
|
import com.utsmyanmar.paylibs.utils.iso_utils.TransactionType;
|
||||||
@ -26,6 +25,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
import sunmi.sunmiui.utils.LogUtil;
|
import sunmi.sunmiui.utils.LogUtil;
|
||||||
|
|
||||||
|
|
||||||
public class ReversalAction {
|
public class ReversalAction {
|
||||||
|
|
||||||
private static final String TAG = ReversalAction.class.getSimpleName();
|
private static final String TAG = ReversalAction.class.getSimpleName();
|
||||||
@ -42,9 +42,6 @@ public class ReversalAction {
|
|||||||
|
|
||||||
private ISOMsgX isoMsgX;
|
private ISOMsgX isoMsgX;
|
||||||
|
|
||||||
private boolean isVoid = false;
|
|
||||||
private boolean isPreAuthCancel = false;
|
|
||||||
|
|
||||||
public static ReversalAction getInstance() {
|
public static ReversalAction getInstance() {
|
||||||
if (INSTANCE == null) {
|
if (INSTANCE == null) {
|
||||||
INSTANCE = new ReversalAction();
|
INSTANCE = new ReversalAction();
|
||||||
@ -53,15 +50,13 @@ 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.ONLY_HEADER,HostName.FINEXUS)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ReversalAction setData(TradeData tradeData) {
|
public ReversalAction setData(TradeData tradeData) {
|
||||||
this.tradeData = tradeData;
|
this.tradeData = tradeData;
|
||||||
payDetail = tradeData.getPayDetail();
|
payDetail = tradeData.getPayDetail();
|
||||||
isVoid = payDetail.getTransactionType() == TransactionsType.VOID.value;
|
|
||||||
isPreAuthCancel = payDetail.getTransactionType() == TransactionsType.PRE_AUTH_VOID.value;
|
|
||||||
payDetail.setTransactionType(TransactionType.REVERSAL);
|
payDetail.setTransactionType(TransactionType.REVERSAL);
|
||||||
// payDetail.setTransType(REVERSAL);
|
// payDetail.setTransType(REVERSAL);
|
||||||
if (TextUtils.equals(payDetail.getAccountType(), MPU)) {
|
if (TextUtils.equals(payDetail.getAccountType(), MPU)) {
|
||||||
@ -134,19 +129,8 @@ public class ReversalAction {
|
|||||||
public void startReversal(ReversalListener reversalListener) {
|
public void startReversal(ReversalListener reversalListener) {
|
||||||
HostName hostName = HostName.BPC;
|
HostName hostName = HostName.BPC;
|
||||||
LogUtil.d(TAG, "Starting Reversal....");
|
LogUtil.d(TAG, "Starting Reversal....");
|
||||||
|
byte[] sendBytes = isoMsgX.buildISOPackets(tradeData, BitmapConfig.MPU_NEW_REVERSAL, MessageType.REVERSAL);
|
||||||
boolean isUPI = TextUtils.equals(payDetail.getAccountType(), CardScheme.UPI.name);
|
// byte[] sendBytes = isoMsgX.buildISOPackets(tradeData, BitmapConfig.BPC_AUTOMATIC_REVERSAL, MessageType.REVERSAL);
|
||||||
String bitmap = BitmapConfig.BPC_AUTOMATIC_REVERSAL;
|
|
||||||
|
|
||||||
|
|
||||||
if((isVoid && isUPI) || (isPreAuthCancel && isUPI)) {
|
|
||||||
bitmap = BitmapConfig.BPC_AUTOMATIC_REVERSAL_UPI;
|
|
||||||
}
|
|
||||||
if(payDetail.getReversalReason().equals(Constant.ISSUER_AUTHENTICATION_FAILURE)) {
|
|
||||||
bitmap = BitmapConfig.BPC_AUTOMATIC_REVERSAL_DE55;
|
|
||||||
}
|
|
||||||
|
|
||||||
byte[] sendBytes = isoMsgX.buildISOPackets(tradeData, bitmap, MessageType.REVERSAL);
|
|
||||||
ISOSocket.getInstance().enqueue(sendBytes, sendBytes.length,true, new ISOCallback() {
|
ISOSocket.getInstance().enqueue(sendBytes, sendBytes.length,true, new ISOCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(byte[] bytes, int length) {
|
public void onReceive(byte[] bytes, int length) {
|
||||||
|
|||||||
@ -137,7 +137,7 @@ public class SignOnProcess {
|
|||||||
SystemParamsOperation.getInstance().saveKeyPIK(encryptedPIK, kcv);
|
SystemParamsOperation.getInstance().saveKeyPIK(encryptedPIK, kcv);
|
||||||
|
|
||||||
// int res = PayLibNex.getInstance().deviceEngine.getPinPad().writeWKey(9, WorkKeyTypeEnum.PINKEY,encryptedPIK,encryptedPIK.length);
|
// int res = PayLibNex.getInstance().deviceEngine.getPinPad().writeWKey(9, WorkKeyTypeEnum.PINKEY,encryptedPIK,encryptedPIK.length);
|
||||||
int res = PayLibsUtils.getInstance().securityOptV2.saveCiphertextKey(AidlConstantsV2.Security.KEY_TYPE_PIK, encryptedPIK, null, tmkIndex, AidlConstantsV2.Security.KEY_ALG_TYPE_3DES, 11);
|
int res = PayLibsUtils.getInstance().securityOptV2.saveCiphertextKey(AidlConstantsV2.Security.KEY_TYPE_PIK, encryptedPIK, null, 9, AidlConstantsV2.Security.KEY_ALG_TYPE_3DES, 11);
|
||||||
resultCode = res;
|
resultCode = res;
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
flag = false;
|
flag = false;
|
||||||
|
|||||||
@ -270,7 +270,8 @@ public class FieldConfig {
|
|||||||
/* FLD 48 */ {3, SDK_8583_LEN_BCD, 322, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, '0'},
|
/* FLD 48 */ {3, SDK_8583_LEN_BCD, 322, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, '0'},
|
||||||
|
|
||||||
// /* FLD 49 */ {0, SDK_8583_LEN_BCD, 3, SDK_8583_DATA_BCD, SDK_8583_ALIGN_R, '0'},
|
// /* FLD 49 */ {0, SDK_8583_LEN_BCD, 3, SDK_8583_DATA_BCD, SDK_8583_ALIGN_R, '0'},
|
||||||
/* FLD 49 */ {0, SDK_8583_LEN_BCD, 3, SDK_8583_DATA_ASC, SDK_8583_ALIGN_R, ' '},
|
// /* FLD 49 */ {0, SDK_8583_LEN_BCD, 3, SDK_8583_DATA_ASC, SDK_8583_ALIGN_R, ' '},
|
||||||
|
/* FLD 49 */ {0, SDK_8583_LEN_BCD, 3, SDK_8583_DATA_BCD, SDK_8583_ALIGN_R, ' '},
|
||||||
/* FLD 50 */ {0, SDK_8583_LEN_BCD, 12, SDK_8583_DATA_BCD, SDK_8583_ALIGN_R, '0'},
|
/* FLD 50 */ {0, SDK_8583_LEN_BCD, 12, SDK_8583_DATA_BCD, SDK_8583_ALIGN_R, '0'},
|
||||||
/* FLD 51 */ {0, SDK_8583_LEN_BCD, 12, SDK_8583_DATA_BCD, SDK_8583_ALIGN_R, '0'},
|
/* FLD 51 */ {0, SDK_8583_LEN_BCD, 12, SDK_8583_DATA_BCD, SDK_8583_ALIGN_R, '0'},
|
||||||
/* FLD 52 */ {0, SDK_8583_LEN_BCD, 8, SDK_8583_DATA_BIT, SDK_8583_ALIGN_L, 0},
|
/* FLD 52 */ {0, SDK_8583_LEN_BCD, 8, SDK_8583_DATA_BIT, SDK_8583_ALIGN_L, 0},
|
||||||
@ -289,15 +290,15 @@ public class FieldConfig {
|
|||||||
/* FLD 59 */ {3, SDK_8583_LEN_BCD, 999, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, '0'},
|
/* FLD 59 */ {3, SDK_8583_LEN_BCD, 999, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, '0'},
|
||||||
|
|
||||||
// original /* FLD 60 */ {3, SDK_8583_LEN_BCD, 17, SDK_8583_DATA_BCD, SDK_8583_ALIGN_L, '0'},
|
// original /* FLD 60 */ {3, SDK_8583_LEN_BCD, 17, SDK_8583_DATA_BCD, SDK_8583_ALIGN_L, '0'},
|
||||||
// MPU /*FLD 60 */ {2, SDK_8583_LEN_BCD, 255, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, ' '},
|
/*FLD 60 */ {2, SDK_8583_LEN_BCD, 255, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, ' '}, // MPU
|
||||||
/*FLD 60 */ {3, SDK_8583_LEN_BCD, 255, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, '0'},
|
// /*FLD 60 */ {3, SDK_8583_LEN_BCD, 255, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, '0'},
|
||||||
/* FLD 61 */ {3, SDK_8583_LEN_BCD, 29, SDK_8583_DATA_BCD, SDK_8583_ALIGN_L, '0'},
|
/* FLD 61 */ {3, SDK_8583_LEN_BCD, 29, SDK_8583_DATA_BCD, SDK_8583_ALIGN_L, '0'},
|
||||||
// /* FLD 62 */ {3, SDK_8583_LEN_BCD, 255, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, '0'}, // Jun 1 2023
|
// /* FLD 62 */ {3, SDK_8583_LEN_BCD, 255, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, '0'}, // Jun 1 2023
|
||||||
/* FLD 62 */ {2, SDK_8583_LEN_BCD, 255, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, ' '},
|
/* FLD 62 */ {2, SDK_8583_LEN_BCD, 255, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, ' '},
|
||||||
// /* FLD 62 */ {2, SDK_8583_LEN_BCD, 255, SDK_8583_DATA_BCD, SDK_8583_ALIGN_R, '0'},
|
// /* FLD 62 */ {2, SDK_8583_LEN_BCD, 255, SDK_8583_DATA_BCD, SDK_8583_ALIGN_R, '0'},
|
||||||
|
|
||||||
// original /* FLD 63 */ {2, SDK_8583_LEN_BCD, 255, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, ' '},
|
/* FLD 63 */ {2, SDK_8583_LEN_BCD, 255, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, ' '}, // MPU
|
||||||
/* FLD 63 */ {3, SDK_8583_LEN_BCD, 255, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, '0'},
|
// /* FLD 63 */ {3, SDK_8583_LEN_BCD, 255, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, '0'},
|
||||||
/* FLD 64 */ {0, SDK_8583_LEN_BCD, 8, SDK_8583_DATA_BIT, SDK_8583_ALIGN_L, 0},
|
/* FLD 64 */ {0, SDK_8583_LEN_BCD, 8, SDK_8583_DATA_BIT, SDK_8583_ALIGN_L, 0},
|
||||||
|
|
||||||
/* FLD 65 */ {0, SDK_8583_LEN_BCD, 8, SDK_8583_DATA_BIT, SDK_8583_ALIGN_L, 0},
|
/* FLD 65 */ {0, SDK_8583_LEN_BCD, 8, SDK_8583_DATA_BIT, SDK_8583_ALIGN_L, 0},
|
||||||
|
|||||||
@ -381,7 +381,7 @@ public class FieldUtils {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
if(payDetail.getTransactionType() == REFUND.value) {
|
if(payDetail.getTransactionType() == REFUND.value) {
|
||||||
field.setDataStr("61");
|
field.setDataStr("00"); // MPU
|
||||||
} else if(payDetail.getCardType() == -1) {
|
} else if(payDetail.getCardType() == -1) {
|
||||||
field.setDataStr("08");
|
field.setDataStr("08");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user