sign on and sale work now

This commit is contained in:
kizzy 2026-05-25 23:11:26 +07:00
parent 5e2cfa3821
commit f80c7c5d1b
16 changed files with 148 additions and 70 deletions

View File

@ -351,9 +351,11 @@ fun AppNavGraph(
composable(Routes.Processing.route) {
val sharedViewModel: SharedViewModel = hiltViewModel(activity)
val transProcessViewModel: TransProcessViewModel = hiltViewModel(activity)
ProcessingRoute(
sharedViewModel = sharedViewModel,
transProcessViewModel = transProcessViewModel,
onNavigateTransactionResult = {
navController.navigate(Routes.TransactionResult.route) {
popUpTo(Routes.Processing.route) {

View File

@ -58,7 +58,7 @@ class PinPadViewModel @Inject constructor(
private var mCancelCoordinate = intArrayOf(0, 48)
private var dukptIndex = 0
private var tmkIndex = 9
private val PIK_INDEX = 1
private val PIK_INDEX = 11
private var tradeData: TradeData? = null
private var payDetail: PayDetail? = null
private var pan: String = ""
@ -145,7 +145,7 @@ class PinPadViewModel @Inject constructor(
return
}
initData()
testInjectPIK()
// testInjectPIK()
initPinPad(customPinPadKeyboard)
}
@ -210,7 +210,7 @@ class PinPadViewModel @Inject constructor(
maxInput = 6
minInput = 0
pinPadType = 1 // custom keyboard
algorithmType = AidlConstants.Security.KEY_ALG_TYPE_3DES
algorithmType = 0
pinType = mPinType
this.timeout = timeout * 1000
isOrderNumKey = pinPadOrder
@ -461,9 +461,10 @@ class PinPadViewModel @Inject constructor(
status: Int,
pinBlock: ByteArray?
) {
LogUtil.e(
TAG,
"onConfirm status:$status"
"onConfirm status:$status and pinblock :${ByteUtil.bytes2HexStr(pinBlock)}"
)
if (status != PIN_CONFIRM_SUCCESS_STATUS) {
_alertMsg.value = "PinPad confirm failed: $status"

View File

@ -2,20 +2,43 @@ package com.mob.utsmyanmar.ui.sending_to_host
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.mob.utsmyanmar.model.TransResultStatus
import com.mob.utsmyanmar.viewmodel.SharedViewModel
import com.mob.utsmyanmar.viewmodel.TransProcessViewModel
import kotlinx.coroutines.delay
import androidx.compose.runtime.getValue
import com.mob.utsmyanmar.viewmodel.ProcessingTransaction
private const val MOCK_HOST_DELAY_MS = 2000L
@Composable
fun ProcessingRoute(
sharedViewModel: SharedViewModel,
transProcessViewModel: TransProcessViewModel,
onNavigateTransactionResult: () -> Unit
) {
val transStatus by transProcessViewModel.transResultStatus.collectAsStateWithLifecycle()
LaunchedEffect(Unit) {
sharedViewModel.saveMockHostResultForTesting()
delay(MOCK_HOST_DELAY_MS)
onNavigateTransactionResult()
transProcessViewModel.startOnlineProcess()
}
LaunchedEffect(transStatus) {
// sharedViewModel.saveMockHostResultForTesting()
// delay(MOCK_HOST_DELAY_MS)
when(transStatus) {
TransResultStatus.SUCCESS -> onNavigateTransactionResult()
TransResultStatus.FAIL -> onNavigateTransactionResult()
else -> {}
}
}
ProcessingScreen()

View File

@ -47,10 +47,11 @@ public final class TerminalKeyUtil {
if(!SystemParamsOperation.getInstance().isInjectOnce()) {
try {
result = mSecurityOptV2.saveKeyDukpt(AidlConstantsV2.Security.KEY_TYPE_DUPKT_IPEK,IPEKByte,IPEKKCVByte,KSNByte,AidlConstantsV2.Security.KEY_ALG_TYPE_3DES,9);
LogUtil.d(ContentValues.TAG, "save IPEK result:" + result);
// 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,IPEKByte,IPEKKCVByte,AidlConstantsV2.Security.KEY_ALG_TYPE_3DES,9);
LogUtil.d(ContentValues.TAG, "save TMK result:" + result);
if (result != 0) {
LogUtil.d(TAG, "save IPEK fail");
LogUtil.d(TAG, "save TMK fail");
} else {
SystemParamsOperation.getInstance().setInjectOnce(true);
}

View File

@ -197,8 +197,8 @@ public class DecodePackage {
//tmp len 55
try {
System.arraycopy(body, tmpLen, nextData, 0, datLen);
// System.arraycopy(body, tmpLen, nextData, 0, body.length-tmpLen);
// System.arraycopy(body, tmpLen, nextData, 0, datLen); 25/May/2026
System.arraycopy(body, tmpLen, nextData, 0, body.length-tmpLen);
} catch (IndexOutOfBoundsException e){
e.printStackTrace();
}

View File

@ -16,13 +16,16 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
import sunmi.sunmiui.utils.LogUtil;
/**
* Package
* Package with MPU certification ready.
*/
public class EncodePackage {
public static Map<String, MsgField> preAssemblyBase(String bitmapHexString,HostName hostName) {
int [][] fieldTypeViaHost = hostName == HostName.BPC ? FieldConfig.FieldTypeConfig128 : FieldConfig.FieldTypeConfigV1;
return preAssembly(bitmapHexString, fieldTypeViaHost );
@ -137,7 +140,12 @@ public class EncodePackage {
if (fieldDataType == FieldConfig.SDK_8583_DATA_BCD) {
if (msgField.getLengthType() > 0) {
// F035 enter into this step
len += msgField.getLengthType() + ( msgField.getDataLength() / 2);
// len += msgField.getLengthType() + ( msgField.getDataLength() / 2);
if(hostName == HostName.BPC) {
len += msgField.getLengthType() + ( msgField.getDataLength() / 2);
} else {
len += (msgField.getLengthType() + 1) / 2 + (msgField.getDataLength() / 2) + (msgField.getDataLength() % 2);
}
// len += (msgField.getLengthType() + 1) / 2 + (msgField.getDataLength() / 2) + (msgField.getDataLength() % 2);
} else {
len += (msgField.getDataLength() / 2) + (msgField.getDataLength() % 2);
@ -146,7 +154,12 @@ public class EncodePackage {
if (msgField.getLengthType() > 0) {
// commended at Oct4 , 2023 ( for BPC DE55)
// len += (msgField.getLengthType() + 1) / 2 + (msgField.getDataLength() / 2);
len += msgField.getLengthType() + (msgField.getDataLength() / 2);
if(hostName == HostName.BPC) {
len += msgField.getLengthType() + (msgField.getDataLength() / 2);
} else {
len += (msgField.getLengthType() + 1) / 2 + (msgField.getDataLength() / 2);
}
} else {
len += msgField.getDataLength();
@ -156,8 +169,14 @@ public class EncodePackage {
// 12:51pm jan 26 / 21 comment switch cuz of getting error at field 57
// fixing bcd ASCII length odd number eg.3
// need to fix this one later for field 62
if(hostName == HostName.BPC) {
len += msgField.getLengthType() + msgField.getDataLength();
} else {
// len += (msgField.getLengthType() + 1) / 2 + msgField.getDataLength(); // Nov19,2025
len += msgField.getDataLength();
}
// len += (msgField.getLengthType() + 1) / 2 + msgField.getDataLength();
len += msgField.getLengthType() + msgField.getDataLength();
// len += msgField.getLengthType() + msgField.getDataLength();
// msgField.getLengthType() => 2
// len+=msgField.getDataLength()-msgField.getLengthType();
@ -220,7 +239,13 @@ public class EncodePackage {
System.arraycopy(varValue, 0, body, index, varValue.length);
index += varValue.length;
} else if (dataType == FieldConfig.SDK_8583_DATA_BCD) {
byte[] varValue = (String.format("%0" + msgField.getLengthType() + "d", msgField.getDataLength()/2)).getBytes();
byte[] varValue;
if(hostName == HostName.BPC) {
varValue = (String.format("%0" + msgField.getLengthType() + "d", msgField.getDataLength()/2)).getBytes();
} else {
varValue = Utils.StrToBCDBytes(String.format("%0"+msgField.getLengthType() + "d",msgField.getDataLength()));
}
// byte[] varValue = (String.format("%0" + msgField.getLengthType() + "d", msgField.getDataLength()/2)).getBytes();
// byte[] varValue = Utils.StrToBCDBytes(String.format("%0" + msgField.getLengthType() + "d", msgField.getDataLength()));
System.arraycopy(varValue, 0, body, index, varValue.length);
index += varValue.length;
@ -230,12 +255,15 @@ public class EncodePackage {
// System.arraycopy(ByteUtil.bytes2HexStr(varValue).getBytes(), 0, body, index, varValue.length);
/*
* for Smart Vista >>>>>>> Aug 29 , 2023 <<<<<<<<
* */
* for Smart Vista >>>>>>> Aug 29 , 2023 <<<<<<<<
* */
if(hostName == HostName.BPC) {
byte[] varValue = (String.format("%0" + msgField.getLengthType() + "d", msgField.getDataLength())).getBytes();
System.arraycopy(varValue, 0, body, index, varValue.length);
index += varValue.length;
}
byte[] varValue = (String.format("%0" + msgField.getLengthType() + "d", msgField.getDataLength())).getBytes();
System.arraycopy(varValue, 0, body, index, varValue.length);
index += varValue.length;
}
}
LogUtil.d(Constant.TAG, "Pack Field[" + msgField.getFieldPos() + "]: " + msgField.getDataStr());
@ -246,27 +274,40 @@ public class EncodePackage {
if (msgField.getDataType() == FieldConfig.SDK_8583_DATA_ASC) {
if (msgField.getLengthType() == 2) {
/* Field 60 issue with TTIP*/
/* String fieldHead = msgField.getDataStr().substring(0,4);
int bcdLen = (fieldHead.length() / 2) + (fieldHead.length() % 2);
byte dat[] = new byte[bcdLen];
Utils.BCDEncode(fieldHead, dat, msgField.getAlignType(), msgField.getFillChar());
System.arraycopy(dat, 0, body, index, bcdLen);
index += bcdLen;
String fieldBody=msgField.getDataStr().substring(4,msgField.getDataLength());
*/
String fieldBody = msgField.getDataStr();
System.arraycopy(fieldBody.getBytes(StandardCharsets.ISO_8859_1), 0, body, index, fieldBody.length());
index += fieldBody.length();
if(hostName == HostName.BPC) {
String fieldBody = msgField.getDataStr();
System.arraycopy(fieldBody.getBytes(StandardCharsets.ISO_8859_1), 0, body, index, fieldBody.length());
index += fieldBody.length();
} else {
String fieldHead = msgField.getDataStr().substring(0,4);
int bcdLen = (fieldHead.length() / 2) + (fieldHead.length() % 2);
byte dat[] = new byte[bcdLen];
Utils.BCDEncode(fieldHead, dat, msgField.getAlignType(), msgField.getFillChar());
System.arraycopy(dat, 0, body, index, bcdLen);
index += bcdLen;
String fieldBody = msgField.getDataStr().substring(4,msgField.getDataLength());
System.arraycopy(fieldBody.getBytes(StandardCharsets.ISO_8859_1), 0, body, index, fieldBody.length());
LogUtil.d(Constant.TAG,"fieldBody : "+fieldBody);
index += fieldBody.length();
}
} else {
LogUtil.d(Constant.TAG, " msgField ------ " + entry.getKey());
try {
if(hostName == HostName.BPC) {
try {
System.arraycopy(msgField.getDataStr().getBytes(StandardCharsets.ISO_8859_1), 0, body, index, msgField.getDataLength());
index += msgField.getDataLength();
} catch (ArrayIndexOutOfBoundsException e) {
e.printStackTrace();
}
} else {
System.arraycopy(msgField.getDataStr().getBytes(StandardCharsets.ISO_8859_1), 0, body, index, msgField.getDataLength());
index += msgField.getDataLength();
} catch (ArrayIndexOutOfBoundsException e) {
e.printStackTrace();
}
}
// try {
// LogUtil.d(Constant.TAG, " msgField ------ " + entry.getKey());

View File

@ -329,8 +329,10 @@ public class ISOSocket {
public void switchIp() {
isSwitchIp = true;
serverIP = getSecondaryIp();
serverPort = getSecondaryPort();
serverIP = "192.168.0.107";
serverPort = 5001;
// serverIP = getSecondaryIp();
// serverPort = getSecondaryPort();
}
public void enqueue(byte[] sendBuff, int sendLen, boolean reversalTrans, ISOCallback listener) {
@ -351,7 +353,7 @@ public class ISOSocket {
// serverPort = getPort();
// serverIP = "posuat.myanmarorientalbank.com";
// serverPort = 5033;
serverIP = "192.168.100.2";
serverIP = "192.168.0.107";
serverPort = 5001;
} else {
isSwitchIp = false;

View File

@ -50,7 +50,7 @@ public class SignOnProcess {
private SignOnProcess() {
tradeData = Params.newTrade(true);
// payDetail = tradeData.getPayDetail();
isoMsgX = new ISOMsgX.ISOMsgXBuilder(ISOVersion.VERSION_1993, ISOMode.BOTH_HEADER_TPDU,HostName.BPC)
isoMsgX = new ISOMsgX.ISOMsgXBuilder(ISOVersion.VERSION_1993, ISOMode.BOTH_HEADER_TPDU,HostName.CARDZONE)
.build();
}
@ -65,9 +65,9 @@ public class SignOnProcess {
payDetail.setProcessCode(TransactionsType.SIGN_ON.processCode);
payDetail.setTransType(TransactionsType.SIGN_ON.name);
payDetail.setTransactionType(TransactionsType.SIGN_ON.value);
payDetail.setHostName(HostName.CARDZONE.name);
byte[] sendBytes = isoMsgX.buildISOPackets(tradeData, BitmapConfig.BPC_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() {
@Override
public void onReceive(byte[] bytes, int length) {
@ -100,6 +100,7 @@ public class SignOnProcess {
if (!TextUtils.equals(SystemParamsOperation.getInstance().getTMKIndex(), "")) {
tmkIndex = Integer.parseInt(SystemParamsOperation.getInstance().getTMKIndex());
}
LogUtil.d(TAG, "TMK Index:" + tmkIndex);
int res = PayLibsUtils.getInstance().securityOptV2.saveCiphertextKey(AidlConstantsV2.Security.KEY_TYPE_PIK, encryptedPIK, null, tmkIndex, AidlConstantsV2.Security.KEY_ALG_TYPE_3DES, 11);
resultCode = res;

View File

@ -28,7 +28,7 @@ public class SystemParamsSettings implements Serializable {
private String comp2 = "9D4FEF8C75DAE3FDBCD3BF899E196E20";
private String tmkIndex = "15";
private String tmkIndex = "9";
private String hostResponseTimeout = "";

View File

@ -2,7 +2,8 @@ package com.utsmyanmar.paylibs.utils.enums;
public enum HostName {
BPC("BPC"),
FINEXUS("FINEXUS");
FINEXUS("FINEXUS"),
CARDZONE("CARDZONE");
public final String name;

View File

@ -29,14 +29,14 @@ public class HostUtils {
if (hostName == HostName.BPC){
bitmap = BitmapConfig.BPC_SALE;
} else {
bitmap = BitmapConfig.FINEXUS_SALE;
bitmap = BitmapConfig.CZ_SALE;
}
break;
case CASH_OUT:
if (hostName == HostName.BPC) {
bitmap = BitmapConfig.BPC_SALE;
} else {
bitmap = BitmapConfig.FINEXUS_SALE;
bitmap = BitmapConfig.CZ_SALE;
}
break;
case VOID:
@ -69,14 +69,14 @@ public class HostUtils {
if (hostName == HostName.BPC) {
bitmap = BitmapConfig.BPC_PRE_AUTH_SALE_VOID_REVERSAL;
} else {
bitmap = BitmapConfig.FINEXUS_SALE;
bitmap = BitmapConfig.CZ_SALE;
}
break;
case PRE_AUTH_COMPLETE:
if (hostName == HostName.BPC) {
bitmap = BitmapConfig.BPC_PRE_AUTH_SALE_COMPLETE;
} else {
bitmap = BitmapConfig.FINEXUS_SALE;
bitmap = BitmapConfig.CZ_SALE;
}
break;
case PRE_AUTH_COMPLETE_VOID:
@ -90,14 +90,14 @@ public class HostUtils {
if (hostName == HostName.BPC) {
bitmap = BitmapConfig.BPC_REFUND;
} else {
bitmap = BitmapConfig.FINEXUS_SALE;
bitmap = BitmapConfig.CZ_SALE;
}
break;
case TIP_ADJUSTMENT:
if (hostName == HostName.BPC) {
bitmap = BitmapConfig.BPC_TIP_ADJUSTMENTS;
} else {
bitmap = BitmapConfig.FINEXUS_SALE;
bitmap = BitmapConfig.CZ_SALE;
}
break;

View File

@ -44,6 +44,7 @@ public class BitmapConfig {
/*-----------------------------------------------------------------------------------------------------*/
/* BPC HOST*/
public static final String BPC_SIGN_ON = "2220010000C00000";
public static final String CZ_SIGN_ON = "2220010000C00000";
// public static final String BPC_ECHO_TEST = "2220010000800000"; // only TID
public static final String BPC_ECHO_TEST = "2220010000C00000"; // TID,MID
@ -191,7 +192,7 @@ public class BitmapConfig {
public static final String MPU_NEW_CASH_ADVANCE="7020058020C09000";
public static final String FINEXUS_SALE="3020078020C00204";
public static final String CZ_SALE="703C058020C09200";
public static final String UPI_SALE = "7020058020C09200";

View File

@ -33,7 +33,7 @@ public class FieldConfig {
/* FLD 02 */ {2, SDK_8583_LEN_ASC, 19, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, '0'},
/* FLD 03 */ {0, SDK_8583_LEN_BCD, 6, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, '0'},
/* FLD 03 */ {0, SDK_8583_LEN_BCD, 6, SDK_8583_DATA_BCD, SDK_8583_ALIGN_L, '0'},
/* FLD 04 */ {0, SDK_8583_LEN_BCD, 12, SDK_8583_DATA_ASC, SDK_8583_ALIGN_R, '0'},
/* FLD 05 */ {0, SDK_8583_LEN_BCD, 13, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, '0'}, //SDK_8583_ALIGN_R
/* FLD 06 */ {0, SDK_8583_LEN_BCD, 12, SDK_8583_DATA_ASC, SDK_8583_ALIGN_R, '0'},
@ -41,10 +41,10 @@ public class FieldConfig {
/* FLD 08 */ {0, SDK_8583_LEN_BCD, 12, SDK_8583_DATA_BCD, SDK_8583_ALIGN_R, '0'},
/* FLD 09 */ {0, SDK_8583_LEN_BCD, 12, SDK_8583_DATA_BCD, SDK_8583_ALIGN_R, '0'},
/* FLD 10 */ {0, SDK_8583_LEN_BCD, 12, SDK_8583_DATA_BCD, SDK_8583_ALIGN_R, '0'},
/* FLD 11 */ {0, SDK_8583_LEN_BCD, 6, SDK_8583_DATA_ASC, SDK_8583_ALIGN_R, '0'},
// /* FLD 12 */ {0, SDK_8583_LEN_BCD, 6, SDK_8583_DATA_BCD, SDK_8583_ALIGN_L, '0'},
/* FLD 12 */ {0, SDK_8583_LEN_BCD, 12, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, '0'}, // BPC HOST
/* FLD 13 */ {0, SDK_8583_LEN_BCD, 4, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, '0'},
/* FLD 11 */ {0, SDK_8583_LEN_BCD, 6, SDK_8583_DATA_BCD, SDK_8583_ALIGN_R, '0'},
/* FLD 12 */ {0, SDK_8583_LEN_BCD, 6, SDK_8583_DATA_BCD, SDK_8583_ALIGN_L, '0'},
// /* FLD 12 */ {0, SDK_8583_LEN_BCD, 12, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, '0'}, // BPC HOST
/* FLD 13 */ {0, SDK_8583_LEN_BCD, 4, SDK_8583_DATA_BCD, SDK_8583_ALIGN_L, '0'},
/* FLD 14 */ {0, SDK_8583_LEN_BCD, 4, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, '0'},
/* FLD 15 */ {0, SDK_8583_LEN_BCD, 6, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, '0'},
/* FLD 16 */ {0, SDK_8583_LEN_BCD, 12, SDK_8583_DATA_BCD, SDK_8583_ALIGN_R, '0'},
@ -58,8 +58,8 @@ public class FieldConfig {
/* FLD 23 */ {0, SDK_8583_LEN_BCD, 3, SDK_8583_DATA_BCD, SDK_8583_ALIGN_R, '0'},
/* FLD 24 */ {0, SDK_8583_LEN_BCD, 3, SDK_8583_DATA_ASC, SDK_8583_ALIGN_R, '0'},
/* FLD 25 */ {0, SDK_8583_LEN_BCD, 2, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, '0'},
/* FLD 24 */ {0, SDK_8583_LEN_BCD, 3, SDK_8583_DATA_BCD, SDK_8583_ALIGN_R, '0'},
/* FLD 25 */ {0, SDK_8583_LEN_BCD, 2, SDK_8583_DATA_BCD, SDK_8583_ALIGN_L, '0'},
/* FLD 26 */ {0, SDK_8583_LEN_BCD, 2, SDK_8583_DATA_BCD, SDK_8583_ALIGN_R, '0'},
/* FLD 27 */ {0, SDK_8583_LEN_BCD, 12, SDK_8583_DATA_BCD, SDK_8583_ALIGN_R, '0'},
/* FLD 28 */ {0, SDK_8583_LEN_BCD, 12, SDK_8583_DATA_BCD, SDK_8583_ALIGN_R, '0'},
@ -81,8 +81,8 @@ public class FieldConfig {
/* FLD 37 */ {0, SDK_8583_LEN_BCD, 12, SDK_8583_DATA_ASC, SDK_8583_ALIGN_R, '0'},
/* FLD 38 */ {0, SDK_8583_LEN_BCD, 6, SDK_8583_DATA_ASC, SDK_8583_ALIGN_R, '0'},
// /* FLD 39 */ {0, SDK_8583_LEN_BCD, 2, SDK_8583_DATA_ASC, SDK_8583_ALIGN_R, '0'},
/* FLD 39 */ {0, SDK_8583_LEN_BCD, 3, SDK_8583_DATA_ASC, SDK_8583_ALIGN_R, '0'}, //BPC
/* FLD 39 */ {0, SDK_8583_LEN_BCD, 2, SDK_8583_DATA_ASC, SDK_8583_ALIGN_R, '0'},
// /* FLD 39 */ {0, SDK_8583_LEN_BCD, 3, SDK_8583_DATA_ASC, SDK_8583_ALIGN_R, '0'}, //BPC
/* FLD 40 */ {0, SDK_8583_LEN_BCD, 40, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, ' '},
/* FLD 41 */ {0, SDK_8583_LEN_BCD, 8, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, ' '},
/* FLD 42 */ {0, SDK_8583_LEN_BCD, 15, SDK_8583_DATA_ASC, SDK_8583_ALIGN_L, ' '},
@ -123,7 +123,7 @@ public class FieldConfig {
/*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 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, ' '}, //Jun 1 2023
// /* 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, ' '},

View File

@ -294,13 +294,13 @@ public class FieldUtils {
field.setDataStr(voucherNo);
break;
case 12: //Time(HHMMSS)
if(payDetail.getHostName().equals(Constant.HOST_BPC)) {
// field.setDataStr("230908105833");
field.setDataStr(payDetail.getTradeDateTime());
} else {
// if(payDetail.getHostName().equals(Constant.HOST_BPC)) {
//
//// field.setDataStr("230908105833");
// field.setDataStr(payDetail.getTradeDateTime());
// } else {
field.setDataStr(payDetail.getTradeTime());
}
// }
break;
case 13: //Date(MMDD)
@ -359,7 +359,7 @@ public class FieldUtils {
// } else {
// iterator.remove();
// }
field.setDataStr("0001");
field.setDataStr("001");
break;
case 24: //Network International Identifier NII

View File

@ -24,7 +24,7 @@ public enum TransactionsType {
CASH_DEPOSIT("CASH_DEPOSIT",13,"210000"),
FUND_TRANSFER("FUND_TRANSFER",14,""),
SETTLEMENT_CUT_OVER("SETTLEMENT_CUT_OVER",15,""),
SIGN_ON("SIGN_ON",16,"990000"),
SIGN_ON("SIGN_ON",16,"920000"),
SETTLEMENT_UPLOAD("SETTLEMENT_UPLOAD",17,"960000"),
TIP_ADJUSTMENT("TIP_ADJUSTMENT",18,"190000"),

View File

@ -82,7 +82,7 @@ public class Params {
payDetail.setIsCanceled(false);
payDetail.transNum = System.currentTimeMillis() / 1000;
// need to add host logic in another place
payDetail.setHostName("BPC");
payDetail.setHostName("CARDZONE");
payDetail.setOriginalTransDate(SystemDateTime.getMMDD()+SystemDateTime.getYYYY());
@ -104,6 +104,11 @@ public class Params {
payDetail.setTransTime(strTransTime);
// mock tid,mid
payDetail.setTerminalNo("00000001");
payDetail.setMerchantNo("100000122234567");
// 4, Nov ,2024
payDetail.setTransCVM(TransCVM.NO_CVM);