Compare commits
11 Commits
a6db8970af
...
2204e99463
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2204e99463 | ||
| 8200cefb96 | |||
|
|
c18704f031 | ||
|
|
eed7dd4680 | ||
| 1a7e86077c | |||
|
|
20417eb811 | ||
|
|
0d796ab20f | ||
| 8b211ca530 | |||
| 6bf49b3f19 | |||
|
|
4d5124fc64 | ||
|
|
6b1c6ef4b5 |
File diff suppressed because one or more lines are too long
@ -15,6 +15,7 @@
|
||||
<option value="$PROJECT_DIR$/ecr" />
|
||||
<option value="$PROJECT_DIR$/ecr-service-lib" />
|
||||
<option value="$PROJECT_DIR$/mpulib" />
|
||||
<option value="$PROJECT_DIR$/nexdlkey-lib" />
|
||||
<option value="$PROJECT_DIR$/nexsdk-lib" />
|
||||
<option value="$PROJECT_DIR$/paylibs" />
|
||||
<option value="$PROJECT_DIR$/paysdk-lib" />
|
||||
|
||||
@ -188,6 +188,7 @@ dependencies {
|
||||
implementation project(path: ':qrgen-lib')
|
||||
//// implementation project(path: ':samlSirius')
|
||||
implementation project(path: ':ecr')
|
||||
implementation project(path: ':nexdlkey-lib')
|
||||
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.2' // 1.1.2
|
||||
|
||||
@ -16,18 +16,25 @@ import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.android.material.appbar.MaterialToolbar;
|
||||
import com.google.android.material.navigation.NavigationView;
|
||||
import com.nexgo.downloadkey.downloadflow.DownloadFEntity;
|
||||
import com.nexgo.downloadkey.downloadflow.DownloadFlow;
|
||||
import com.nexgo.downloadkey.downloadflow.DownloadFlowProcessListener;
|
||||
import com.nexgo.downloadkey.downloadflow.DownloadFlowResultEntity;
|
||||
import com.nexgo.downloadkey.downloadflow.DownloadResult;
|
||||
import com.utsmyanmar.baselib.repo.Repository;
|
||||
import com.utsmyanmar.baselib.ui.AnimationDialog;
|
||||
import com.utsmyanmar.checkxread.sdk.NexGoSDK;
|
||||
import com.utsmyanmar.ecr.ECRHelper;
|
||||
import com.utsmyanmar.paylibs.Constant;
|
||||
import com.utsmyanmar.paylibs.print.printx.PrintXReceipt;
|
||||
import com.utsmyanmar.paylibs.utils.POSUtil;
|
||||
import com.utsmyanmar.paylibs.utils.core_utils.SystemParamsOperation;
|
||||
import com.utsmyanmar.paylibs.utils.enums.TransMenu;
|
||||
import com.utsmyanmar.paylibs.utils.iso_utils.TransactionsType;
|
||||
@ -126,6 +133,8 @@ public class MainActivity extends AppCompatActivity implements
|
||||
initSpecialBackHandlingFragments();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void initViewModels() {
|
||||
sharedViewModel = new ViewModelProvider(this).get(SharedViewModel.class);
|
||||
}
|
||||
|
||||
@ -931,5 +931,24 @@ public class MainFragment extends DataBindingFragment {
|
||||
safeNavigateToRouteId();
|
||||
}
|
||||
}
|
||||
|
||||
public void onClickVoid(){
|
||||
if (mainViewModel.payDetailSingle.getValue() != null) {
|
||||
mainViewModel.startReversal(mainViewModel.payDetailSingle.getValue());
|
||||
} else if (checkTid()) {
|
||||
showDeclineDialog("Please Download Config!");
|
||||
} else {
|
||||
sharedViewModel.setTransactionsType(TransactionsType.VOID);
|
||||
// sharedViewModel.transMenu.postValue(TransMenu.TRANSACTIONS);
|
||||
sharedViewModel.setTransMenu(TransMenu.TRANSACTIONS);
|
||||
routeId = R.id.action_nav_main_to_inputPasswordFragment;
|
||||
safeRouteTo(currentId(),routeId, hostId());
|
||||
}
|
||||
}
|
||||
|
||||
public void onClickReport(){
|
||||
routeId = R.id.action_nav_main_to_manageFunctionFragment;
|
||||
safeRouteTo(currentId(), routeId, hostId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,6 +58,7 @@ public class MainViewModel extends ViewModel {
|
||||
|
||||
public MutableLiveData<Boolean> kPayStatus = new MutableLiveData<>();
|
||||
|
||||
|
||||
public SingleLiveEvent<String> disabledMsg = new SingleLiveEvent<>();
|
||||
|
||||
public SingleLiveEvent<List<PayDetail>> settlementPOS = new SingleLiveEvent<>();
|
||||
|
||||
@ -1,17 +1,24 @@
|
||||
package com.utsmm.kbz.ui;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.lifecycle.Observer;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.navigation.Navigation;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.stream.MalformedJsonException;
|
||||
import com.utsmm.kbz.config.Constants;
|
||||
import com.nexgo.downloadkey.downloadflow.DownloadFEntity;
|
||||
import com.nexgo.downloadkey.downloadflow.DownloadFlow;
|
||||
import com.nexgo.downloadkey.downloadflow.DownloadFlowProcessListener;
|
||||
import com.nexgo.downloadkey.downloadflow.DownloadFlowResultEntity;
|
||||
import com.nexgo.downloadkey.downloadflow.DownloadResult;
|
||||
import com.utsmyanmar.baselib.emv.EmvParamOperation;
|
||||
import com.utsmyanmar.baselib.fragment.DataBindingFragment;
|
||||
import com.utsmyanmar.baselib.network.model.sirius.SiriusError;
|
||||
@ -50,6 +57,7 @@ public class SettingsFragment extends DataBindingFragment {
|
||||
private MainViewModel mainViewModel;
|
||||
private int count = 0;
|
||||
|
||||
|
||||
// Data binding will handle view access automatically
|
||||
private FragmentSettingsModernBinding binding;
|
||||
|
||||
@ -182,6 +190,12 @@ public class SettingsFragment extends DataBindingFragment {
|
||||
|
||||
// ClickEvent class for data binding - this is the proper pattern
|
||||
public class ClickEvent {
|
||||
public void onHostConfigClick(){
|
||||
int routeId = R.id.action_nav_settings_to_hostConfigFragment;
|
||||
int currentId = R.id.nav_settings;
|
||||
int hostId = Constants.NAV_HOST_ID;
|
||||
safeRouteTo(currentId, routeId, hostId);
|
||||
}
|
||||
|
||||
public void onVersionClick() {
|
||||
try {
|
||||
@ -196,6 +210,16 @@ public class SettingsFragment extends DataBindingFragment {
|
||||
}
|
||||
}
|
||||
|
||||
public void onInjectKeyClick() {
|
||||
try {
|
||||
LogUtil.d(TAG, "Inject Key clicked");
|
||||
Navigation.findNavController(requireActivity(), R.id.nav_host_fragment)
|
||||
.navigate(R.id.action_nav_settings_to_injectKeyFragment);
|
||||
} catch (Exception e) {
|
||||
LogUtil.e(TAG, "Error navigating to inject key: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void onDemoClick() {
|
||||
try {
|
||||
boolean newValue = !SystemParamsOperation.getInstance().getDemoStatus();
|
||||
|
||||
@ -3,6 +3,8 @@ package com.utsmm.kbz.ui.adapters;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageButton;
|
||||
@ -299,4 +301,5 @@ public class MyBindingAdapter {
|
||||
textView.setText("TRC:"+payDetail.getVoucherNo());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@ import com.utsmyanmar.baselib.network.model.e_receipt.EReceiptResponse;
|
||||
import com.utsmyanmar.baselib.network.model.sirius.SiriusRequest;
|
||||
import com.utsmyanmar.baselib.network.model.sirius.SiriusResponse;
|
||||
import com.utsmyanmar.baselib.repo.Repository;
|
||||
import com.utsmyanmar.baselib.util.TerminalUtil;
|
||||
import com.utsmyanmar.ecr.data.TransType;
|
||||
import com.utsmyanmar.ecr.data.model.Transactions;
|
||||
import com.utsmyanmar.paylibs.model.PayDetail;
|
||||
@ -43,10 +44,6 @@ import javax.inject.Inject;
|
||||
@HiltViewModel
|
||||
public class SharedViewModel extends ViewModel {
|
||||
|
||||
public MutableLiveData<String> terminalId = new MutableLiveData<>();
|
||||
|
||||
public MutableLiveData<Boolean> qrPartialRefundEnable = new MutableLiveData<>();
|
||||
|
||||
private static final String TAG = SharedViewModel.class.getSimpleName();
|
||||
|
||||
private final Repository repository;
|
||||
@ -170,6 +167,9 @@ public class SharedViewModel extends ViewModel {
|
||||
|
||||
private PayDetail mPayDetail = new PayDetail();
|
||||
|
||||
public MutableLiveData<String> serialNumber = new MutableLiveData<>();
|
||||
|
||||
|
||||
// Updated constructor for Hilt ViewModel
|
||||
@Inject
|
||||
public SharedViewModel(Repository repository) {
|
||||
@ -177,10 +177,8 @@ public class SharedViewModel extends ViewModel {
|
||||
setPrintStatus(PrintStatus.FIRST_PRINT);
|
||||
isReprint.setValue(false);
|
||||
cardNo.setValue("");
|
||||
String tid = SystemParamsOperation.getInstance().getTerminalId();
|
||||
terminalId.setValue(tid);
|
||||
boolean isQrPartialRefundEnable = SystemParamsOperation.getInstance().isQrPartialRefundEnable();
|
||||
qrPartialRefundEnable.setValue(isQrPartialRefundEnable);
|
||||
String sn = TerminalUtil.getInstance().getSerialNo();
|
||||
serialNumber.setValue(sn);
|
||||
}
|
||||
|
||||
|
||||
@ -317,6 +315,7 @@ public class SharedViewModel extends ViewModel {
|
||||
|
||||
|
||||
|
||||
|
||||
public void startPrintReceipt(boolean isFirstPrint) {
|
||||
/*
|
||||
* First Print is Merchant Copy..
|
||||
|
||||
@ -67,10 +67,7 @@ public class KPayViewModel extends ViewModel {
|
||||
private static final String NONCE_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
||||
private static final int NONCE_LENGTH = 32;
|
||||
private final SecureRandom secureRandom = new SecureRandom();
|
||||
|
||||
|
||||
|
||||
|
||||
public MutableLiveData<Boolean> partialRefundEnabled = new MutableLiveData<>();
|
||||
|
||||
private String generateRandomTwoChars() {
|
||||
// You can reuse the existing character set and SecureRandom instance
|
||||
@ -293,6 +290,9 @@ public class KPayViewModel extends ViewModel {
|
||||
@Inject
|
||||
public KPayViewModel(Repository repository) {
|
||||
this.repository = repository;
|
||||
|
||||
boolean enabled = SystemParamsOperation.getInstance().isQrPartialRefundEnable();
|
||||
partialRefundEnabled.setValue(enabled);
|
||||
}
|
||||
|
||||
private TradeData tradeData;
|
||||
|
||||
@ -14,7 +14,7 @@ import androidx.annotation.Nullable;
|
||||
import com.utsmm.kbz.util.tms.TMSUtil;
|
||||
import com.utsmyanmar.baselib.fragment.DataBindingFragment;
|
||||
import com.utsmyanmar.baselib.network.model.KPayRefund;
|
||||
import com.utsmyanmar.baselib.network.model.e_receipt.EReceiptQRRequest;
|
||||
//import com.utsmyanmar.baselib.network.model.e_receipt.EReceiptQRRequest;
|
||||
import com.utsmyanmar.baselib.util.DataBindingConfig;
|
||||
import com.utsmyanmar.paylibs.model.PayDetail;
|
||||
import com.utsmyanmar.paylibs.model.TradeData;
|
||||
|
||||
@ -335,7 +335,7 @@ public class QRTransactionFragment extends DataBindingFragment implements DataBi
|
||||
|
||||
} catch (Exception e) {
|
||||
LogUtil.d(TAG, "On Exception::");
|
||||
sharedViewModel.pushReceipt(buildEReceiptQRReceipt(payDetail, false, "QR Failed! :" + e.getMessage()));
|
||||
// sharedViewModel.pushReceipt(buildEReceiptQRReceipt(payDetail, false, "QR Failed! :" + e.getMessage()));
|
||||
e.printStackTrace();
|
||||
EReceiptRequest request = EReceiptUtil.getInstance().generateQRReceipt(payDetail, TransResultStatus.TIME_OUT);
|
||||
sharedViewModel.pushReceipt(request);
|
||||
@ -431,58 +431,4 @@ public class QRTransactionFragment extends DataBindingFragment implements DataBi
|
||||
});
|
||||
}
|
||||
|
||||
private String mapCurrency(String currency) {
|
||||
if (currency == null) return "MMK";
|
||||
|
||||
switch (currency) {
|
||||
case "104": return "MMK";
|
||||
case "840": return "USD";
|
||||
case "764": return "THB";
|
||||
case "702": return "SGD";
|
||||
case "978": return "EUR";
|
||||
default: return currency; // Already alphabetic? return as-is
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private EReceiptQRRequest buildEReceiptQRReceipt(PayDetail payDetail, boolean isSuccess, String reason) {
|
||||
|
||||
// Timestamp (MMddHHmmss)
|
||||
String currentTimestamp = new java.text.SimpleDateFormat(
|
||||
"MMddHHmmss", java.util.Locale.getDefault()
|
||||
).format(new java.util.Date());
|
||||
|
||||
// Device Info
|
||||
String serial = TMSUtil.getInstance().getSerialNumber();
|
||||
String appId = requireActivity().getPackageName();
|
||||
|
||||
// Terminal Info
|
||||
// String terminalId = SystemParamsOperation.getInstance().getTerminalId();
|
||||
// String merchantId = SystemParamsOperation.getInstance().getMerchantId();
|
||||
|
||||
|
||||
// Amount convert (long cents → double → 0.00)
|
||||
double realAmount = payDetail.getAmount() / 100.0;
|
||||
DecimalFormat df = new DecimalFormat("0.00");
|
||||
String amount = df.format(realAmount);
|
||||
|
||||
EReceiptQRRequest request = new EReceiptQRRequest();
|
||||
request.setDE3("QR"); // QR Process Code
|
||||
request.setDE4(amount); // Amount
|
||||
request.setDE7(currentTimestamp); // Timestamp
|
||||
request.setDE37(payDetail.getReferNo()); // Reference No
|
||||
request.setDE39(isSuccess ? "A" : "E"); // A=Approved, D=Declined/Timeout
|
||||
request.setDE41(terminalId);
|
||||
request.setDE42(merchantId);
|
||||
request.setDE49(mapCurrency(payDetail.getCurrencyCode())); // Currency
|
||||
request.setSerial(serial);
|
||||
request.setInvoiceNumber(payDetail.getInvoiceNo());
|
||||
request.setDE11(payDetail.getVoucherNo()); // STAN
|
||||
request.setAppId(appId);
|
||||
request.setDescription(reason); // Anything: success / timeout / error message
|
||||
|
||||
return request;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -219,120 +219,6 @@ public class NaviMainFragment extends DataBindingFragment {
|
||||
|
||||
return grayLevelEnum;
|
||||
}
|
||||
|
||||
public void onClickPrintConfig() {
|
||||
|
||||
DeviceEngine deviceEngine = APIProxy.getDeviceEngine(requireContext());
|
||||
Printer printer = deviceEngine.getPrinter();
|
||||
DeviceInfo deviceInfo = deviceEngine.getDeviceInfo();
|
||||
|
||||
int FONT_NORMAL = 24;
|
||||
int FONT_HEADER = 32;
|
||||
|
||||
int status = printer.getStatus();
|
||||
if (status != SdkResult.Success) {
|
||||
Log.d("Printer", "Printer error: " + status);
|
||||
return;
|
||||
}
|
||||
|
||||
SystemParamsOperation sp = SystemParamsOperation.getInstance();
|
||||
|
||||
String addr1 = sp.getMerchantAddress();
|
||||
String addr2 = sp.getMerchantAddress2();
|
||||
String phone = sp.getMerchantPhoneNo();
|
||||
if (addr2 == null) addr2 = "";
|
||||
if (phone == null || phone.trim().isEmpty()) phone = "";
|
||||
|
||||
printer.setGray(getGrayLevel());
|
||||
|
||||
// ================== Header ==================
|
||||
printer.appendPrnStr("==== Device Configs ====", FONT_HEADER, AlignEnum.CENTER, true);
|
||||
printer.appendPrnStr(" ", FONT_NORMAL, AlignEnum.CENTER, false);
|
||||
|
||||
if(!TextUtils.isEmpty(addr1))
|
||||
printer.appendPrnStr(addr1, FONT_NORMAL, AlignEnum.CENTER, true);
|
||||
if(!TextUtils.isEmpty(addr2))
|
||||
printer.appendPrnStr(addr2, FONT_NORMAL, AlignEnum.CENTER, true);
|
||||
if(!TextUtils.isEmpty(phone))
|
||||
printer.appendPrnStr(phone, FONT_NORMAL, AlignEnum.CENTER, true);
|
||||
|
||||
printer.appendPrnStr(" ", FONT_NORMAL, AlignEnum.CENTER, false);
|
||||
|
||||
|
||||
// ================== Device Info ==================
|
||||
printer.appendPrnStr("Device S/N", deviceInfo.getSn(), FONT_NORMAL, true);
|
||||
printer.appendPrnStr(" ", FONT_NORMAL, AlignEnum.CENTER, false);
|
||||
|
||||
|
||||
// ================== Host Section ==================
|
||||
printer.appendPrnStr("HOSTS", FONT_HEADER, AlignEnum.LEFT, true);
|
||||
printer.appendPrnStr(" ", FONT_NORMAL, AlignEnum.CENTER, false);
|
||||
|
||||
// ---- Primary Host ----
|
||||
printer.appendPrnStr("Name :", sp.getHostName(), FONT_NORMAL, false);
|
||||
printTwoColWrapped(printer, "IP :", sp.getIpAddress(), FONT_NORMAL, false);
|
||||
printTwoColWrapped(printer, "Sec IP :", sp.getSecIpAddress(), FONT_NORMAL, false);
|
||||
printer.appendPrnStr("MID :", sp.getMerchantId(), FONT_NORMAL, false);
|
||||
printer.appendPrnStr("TID :", sp.getTerminalId(), FONT_NORMAL, false);
|
||||
|
||||
printer.appendPrnStr("--------------------------------", FONT_NORMAL, AlignEnum.LEFT, false);
|
||||
|
||||
// ---- Secondary Host ----
|
||||
if (!TextUtils.isEmpty(sp.getSecHostName())) {
|
||||
|
||||
printer.appendPrnStr("Name :", sp.getSecHostName(), FONT_NORMAL, false);
|
||||
printTwoColWrapped(printer, "IP :", sp.getSecHostIpAddress(), FONT_NORMAL, false);
|
||||
printTwoColWrapped(printer, "Sec IP :", sp.getSecHostSecIpAddress(), FONT_NORMAL, false);
|
||||
printer.appendPrnStr("MID :", sp.getSecHostMerchantId(), FONT_NORMAL, false);
|
||||
printer.appendPrnStr("TID :", sp.getSecHostTerminalId(), FONT_NORMAL, false);
|
||||
|
||||
printer.appendPrnStr("--------------------------------", FONT_NORMAL, AlignEnum.LEFT, false);
|
||||
}
|
||||
|
||||
// ================== Start Printing ==================
|
||||
printer.startPrint(true, ret -> {
|
||||
if(ret == SdkResult.Success){
|
||||
Log.d("Printer", "Print success");
|
||||
} else {
|
||||
Log.d("Printer", "Print failed: " + ret);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void printTwoColWrapped(Printer p, String left, String right, int font, Boolean isBold) {
|
||||
|
||||
if (right == null) right = "";
|
||||
|
||||
int maxRight = 24; // recommended width for right column
|
||||
|
||||
// If right text fits → print normally
|
||||
if (right.length() <= maxRight) {
|
||||
p.appendPrnStr(left, right, font, isBold);
|
||||
return;
|
||||
}
|
||||
|
||||
// Otherwise wrap it
|
||||
int start = 0;
|
||||
boolean firstLine = true;
|
||||
|
||||
while (start < right.length()) {
|
||||
int end = Math.min(start + maxRight, right.length());
|
||||
String part = right.substring(start, end);
|
||||
|
||||
if (firstLine) {
|
||||
p.appendPrnStr(left, part, font, isBold);
|
||||
firstLine = false;
|
||||
} else {
|
||||
// subsequent lines: blank left column
|
||||
p.appendPrnStr(" ", part, font, isBold);
|
||||
}
|
||||
|
||||
start += maxRight;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void onClickVersion(){
|
||||
mListener.onClickVersion();
|
||||
}
|
||||
|
||||
@ -12,12 +12,15 @@ import com.utsmm.kbz.config.Constants;
|
||||
import com.utsmm.kbz.ui.core_viewmodel.SharedViewModel;
|
||||
import com.utsmm.kbz.ui.kpay.KPayViewModel;
|
||||
import com.utsmm.kbz.ui.kpay.QRRefundFragment;
|
||||
import com.utsmm.kbz.util.EReceiptUtil;
|
||||
import com.utsmm.kbz.util.TransactionUtil;
|
||||
import com.utsmm.kbz.util.ecr.CoreUtils;
|
||||
import com.utsmm.kbz.util.enums.TransResultStatus;
|
||||
import com.utsmm.kbz.util.tms.TMSUtil;
|
||||
import com.utsmyanmar.baselib.fragment.DataBindingFragment;
|
||||
import com.utsmyanmar.baselib.network.model.KPayRefund;
|
||||
import com.utsmyanmar.baselib.network.model.e_receipt.EReceiptQRRequest;
|
||||
//import com.utsmyanmar.baselib.network.model.e_receipt.EReceiptQRRequest;
|
||||
import com.utsmyanmar.baselib.network.model.e_receipt.EReceiptRequest;
|
||||
import com.utsmyanmar.baselib.util.DataBindingConfig;
|
||||
import com.utsmyanmar.paylibs.model.PayDetail;
|
||||
import com.utsmyanmar.paylibs.system.SystemDateTime;
|
||||
@ -144,7 +147,8 @@ public class QRRefundProcessFragment extends DataBindingFragment {
|
||||
payDetail.setReferNo(referenceNo);
|
||||
payDetail.setIsCanceled(true);
|
||||
|
||||
sharedViewModel.pushReceipt(buildEReceiptQRReceipt(payDetail, true, "Refund success"));
|
||||
EReceiptRequest request = EReceiptUtil.getInstance().generateQRRefundReceipt(sharedViewModel.payDetail.getValue(), TransResultStatus.SUCCESS);
|
||||
sharedViewModel.pushReceipt(request);
|
||||
|
||||
retrievedUpdatePayDetail(referenceNo);
|
||||
|
||||
@ -159,7 +163,8 @@ public class QRRefundProcessFragment extends DataBindingFragment {
|
||||
errorMsg = response.getResponse().getMsg();
|
||||
}
|
||||
payDetail.setTradeResultDes(errorMsg);
|
||||
sharedViewModel.pushReceipt(buildEReceiptQRReceipt(payDetail, false, "Refund Failed! "+errorMsg));
|
||||
EReceiptRequest request = EReceiptUtil.getInstance().generateQRRefundReceipt(sharedViewModel.payDetail.getValue(), TransResultStatus.FAIL);
|
||||
sharedViewModel.pushReceipt(request);
|
||||
|
||||
sharedViewModel.payDetail.setValue(payDetail);
|
||||
navigateToNext();
|
||||
@ -220,57 +225,4 @@ public class QRRefundProcessFragment extends DataBindingFragment {
|
||||
}
|
||||
}
|
||||
|
||||
private String mapCurrency(String currency) {
|
||||
if (currency == null) return "MMK";
|
||||
|
||||
switch (currency) {
|
||||
case "104": return "MMK";
|
||||
case "840": return "USD";
|
||||
case "764": return "THB";
|
||||
case "702": return "SGD";
|
||||
case "978": return "EUR";
|
||||
default: return currency; // Already alphabetic? return as-is
|
||||
}
|
||||
}
|
||||
|
||||
private EReceiptQRRequest buildEReceiptQRReceipt(PayDetail payDetail, boolean isSuccess, String reason) {
|
||||
|
||||
// Timestamp (MMddHHmmss)
|
||||
String currentTimestamp = new java.text.SimpleDateFormat(
|
||||
"MMddHHmmss", java.util.Locale.getDefault()
|
||||
).format(new java.util.Date());
|
||||
|
||||
// Device Info
|
||||
String serial = TMSUtil.getInstance().getSerialNumber();
|
||||
String appId = requireActivity().getPackageName();
|
||||
|
||||
|
||||
// Terminal Info
|
||||
// String terminalId = SystemParamsOperation.getInstance().getTerminalId();
|
||||
// String merchantId = SystemParamsOperation.getInstance().getMerchantId();
|
||||
String terminalId = TransactionUtil.getInstance().getQRTerminalId();
|
||||
String merchantId = TransactionUtil.getInstance().getQRMerchantId();
|
||||
|
||||
// Amount convert (long cents → double → 0.00)
|
||||
double realAmount = payDetail.getAmount() / 100.0;
|
||||
DecimalFormat df = new DecimalFormat("0.00");
|
||||
String amount = df.format(realAmount);
|
||||
|
||||
EReceiptQRRequest request = new EReceiptQRRequest();
|
||||
request.setDE3("QRV"); // QR Process Code(fix later with get from config)
|
||||
request.setDE4(amount); // Amount
|
||||
request.setDE7(currentTimestamp); // Timestamp
|
||||
request.setDE37(payDetail.getReferNo()); // Reference No
|
||||
request.setDE39(isSuccess ? "A" : "E"); // A=Approved, E=Error/Declined/Timeout
|
||||
request.setDE41(terminalId);
|
||||
request.setDE42(merchantId);
|
||||
request.setDE49(mapCurrency(payDetail.getCurrencyCode())); // Currency(fix later with get from config)
|
||||
request.setSerial(serial);
|
||||
request.setInvoiceNumber(payDetail.getInvoiceNo());
|
||||
request.setDE11(payDetail.getVoucherNo()); // STAN
|
||||
request.setAppId(appId);
|
||||
request.setDescription(reason); // Anything: success / timeout / error message
|
||||
|
||||
return request;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,244 @@
|
||||
package com.utsmm.kbz.ui.settings;
|
||||
|
||||
import static androidx.databinding.DataBindingUtil.getBinding;
|
||||
|
||||
import static com.utsmyanmar.baselib.BaseApplication.sunmiPrinterService;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Typeface;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import android.os.RemoteException;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.nexgo.oaf.apiv3.APIProxy;
|
||||
import com.nexgo.oaf.apiv3.DeviceEngine;
|
||||
import com.nexgo.oaf.apiv3.DeviceInfo;
|
||||
import com.nexgo.oaf.apiv3.SdkResult;
|
||||
import com.nexgo.oaf.apiv3.device.printer.AlignEnum;
|
||||
import com.nexgo.oaf.apiv3.device.printer.GrayLevelEnum;
|
||||
import com.nexgo.oaf.apiv3.device.printer.Printer;
|
||||
import com.utsmm.kbz.BR;
|
||||
import com.utsmm.kbz.R;
|
||||
import com.utsmm.kbz.config.Constants;
|
||||
import com.utsmm.kbz.databinding.FragmentHostConfigBinding;
|
||||
import com.utsmyanmar.baselib.fragment.DataBindingFragment;
|
||||
import com.utsmyanmar.baselib.util.DataBindingConfig;
|
||||
import com.utsmyanmar.baselib.util.DialogCallback;
|
||||
import com.utsmyanmar.paylibs.PayLibsUtils;
|
||||
import com.utsmyanmar.paylibs.print.PaperRollStatusCallback;
|
||||
import com.utsmyanmar.paylibs.print.PrintHelper;
|
||||
import com.utsmyanmar.paylibs.utils.LogUtil;
|
||||
import com.utsmyanmar.paylibs.utils.core_utils.SystemParamsOperation;
|
||||
import com.utsmyanmar.paylibs.utils.print_utils.BitmapUtils;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class HostConfigFragment extends DataBindingFragment {
|
||||
|
||||
private HostConfigViewModel viewModel;
|
||||
protected Printer printer;
|
||||
int FONT_NORMAL = 20;
|
||||
int FONT_HEADER = 28;
|
||||
|
||||
@Override
|
||||
protected void initViewModel() {
|
||||
viewModel = new ViewModelProvider(this).get(HostConfigViewModel.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected DataBindingConfig getDataBindingConfig() {
|
||||
return new DataBindingConfig(R.layout.fragment_host_config, BR.viewModel, viewModel)
|
||||
.addBindingParam(BR.click, new ClickHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState){
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
|
||||
FragmentHostConfigBinding binding = (FragmentHostConfigBinding) this.binding;
|
||||
viewModel.loadConfig();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume(){
|
||||
super.onResume();
|
||||
|
||||
setToolBarTitleWithBackIcon("Host Configs");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int currentId() {
|
||||
return R.id.hostConfigFragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int hostId() {
|
||||
return Constants.NAV_HOST_ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int routeId() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public class ClickHandler {
|
||||
public void onCancel(){
|
||||
safePopBack(R.id.hostConfigFragment, Constants.NAV_HOST_ID);
|
||||
}
|
||||
|
||||
public void onPrint(){
|
||||
startPrintProcess();
|
||||
}
|
||||
}
|
||||
private void startPrintProcess() {
|
||||
|
||||
DeviceEngine engine = APIProxy.getDeviceEngine(requireContext());
|
||||
printer = engine.getPrinter();
|
||||
int printerStatus = printer.getStatus();
|
||||
if(printerStatus != SdkResult.Success){
|
||||
Log.e("Print Config", "Printer Error: " + printerStatus);
|
||||
return;
|
||||
}
|
||||
printer.setGray(GrayLevelEnum.LEVEL_2);
|
||||
printer.setTypeface(Typeface.SANS_SERIF);
|
||||
SystemParamsOperation sp = SystemParamsOperation.getInstance();
|
||||
|
||||
|
||||
Bitmap bitmap = BitmapFactory.decodeResource(requireContext().getResources(), com.utsmyanmar.paylibs.R.drawable.print_kbz_logo);
|
||||
printLogo(bitmap);
|
||||
printer.appendPrnStr("\n", FONT_NORMAL, AlignEnum.CENTER, false);
|
||||
printer.appendPrnStr("TERMINAL CONFIGURATION", FONT_HEADER, AlignEnum.CENTER, true);
|
||||
printer.appendPrnStr("\n", FONT_NORMAL, AlignEnum.CENTER, false);
|
||||
printer.appendPrnStr(sp.getMerchantName(), FONT_NORMAL, AlignEnum.LEFT, false);
|
||||
printer.appendPrnStr(sp.getMerchantPhoneNo(), FONT_NORMAL, AlignEnum.LEFT, false);
|
||||
printer.appendPrnStr(sp.getMerchantAddress(), FONT_NORMAL, AlignEnum.CENTER, false);
|
||||
printer.appendPrnStr(sp.getMerchantAddress2(), FONT_NORMAL, AlignEnum.CENTER, false);
|
||||
printer.appendPrnStr("\n--------------------------------\n", FONT_NORMAL, AlignEnum.LEFT, false);
|
||||
printer.appendPrnStr("PRIMARY HOST", FONT_NORMAL, AlignEnum.LEFT, true);
|
||||
printer.appendPrnStr("Name : " + sp.getHostName(), FONT_NORMAL, AlignEnum.LEFT, false);
|
||||
printer.appendPrnStr("TID : " + sp.getTerminalId(), FONT_NORMAL, AlignEnum.LEFT, false);
|
||||
printer.appendPrnStr("MID : " + sp.getMerchantId(), FONT_NORMAL, AlignEnum.LEFT, false);
|
||||
String ipAddress = sp.getIpAddress();
|
||||
String[] ipAndPort = splitIpAndPort(ipAddress);
|
||||
String ip = ipAndPort[0];
|
||||
String port = ipAndPort[1];
|
||||
printer.appendPrnStr("Primary Ip : " + ip, FONT_NORMAL, AlignEnum.LEFT, true);
|
||||
printer.appendPrnStr("Primary Port : " + port, FONT_NORMAL, AlignEnum.LEFT, true);
|
||||
String secIpAddress = sp.getSecIpAddress();
|
||||
String[] secIpAndPort = splitIpAndPort(secIpAddress);
|
||||
String secIp = secIpAndPort[0];
|
||||
String secPort = secIpAndPort[1];
|
||||
printer.appendPrnStr("Secondary Ip : " + secIp, FONT_NORMAL, AlignEnum.LEFT, true);
|
||||
printer.appendPrnStr("Secondary Port : " + secPort, FONT_NORMAL, AlignEnum.LEFT, true);
|
||||
printer.appendPrnStr("Currency Code : " + sp.getCurrencyType(), FONT_NORMAL, AlignEnum.LEFT, true);
|
||||
printer.appendPrnStr("\n--------------------------------\n", FONT_NORMAL, AlignEnum.LEFT, false);
|
||||
|
||||
if (!TextUtils.isEmpty(sp.getSecHostName())) {
|
||||
printer.appendPrnStr("SECONDARY HOST", FONT_NORMAL, AlignEnum.LEFT, true);
|
||||
printer.appendPrnStr("Name : " + sp.getSecHostName(), FONT_NORMAL, AlignEnum.LEFT, false);
|
||||
printer.appendPrnStr("TID : " + sp.getSecHostTerminalId(), FONT_NORMAL, AlignEnum.LEFT, false);
|
||||
printer.appendPrnStr("MID : " + sp.getSecHostMerchantId(), FONT_NORMAL, AlignEnum.LEFT, false);
|
||||
String secHostIpAddress = sp.getSecHostIpAddress();
|
||||
String[] secHostIpAndPort = splitIpAndPort(secHostIpAddress);
|
||||
String secHostIp = secHostIpAndPort[0];
|
||||
String secHostPort = secHostIpAndPort[1];
|
||||
printer.appendPrnStr("Primary Ip : " + secHostIp, FONT_NORMAL, AlignEnum.LEFT, true);
|
||||
printer.appendPrnStr("Primary Port : " + secHostPort, FONT_NORMAL, AlignEnum.LEFT, true);
|
||||
String secHostSecIpAddress = sp.getSecHostSecIpAddress();
|
||||
String[] SecHostSecIpAndPort = splitIpAndPort(secHostSecIpAddress);
|
||||
String secHostSecIp = SecHostSecIpAndPort[0];
|
||||
String secHostSecPort = SecHostSecIpAndPort[1];
|
||||
printer.appendPrnStr("Secondary Ip : " + secHostSecIp, FONT_NORMAL, AlignEnum.LEFT, true);
|
||||
printer.appendPrnStr("Secondary Port : " + secHostSecPort, FONT_NORMAL, AlignEnum.LEFT, true);
|
||||
printer.appendPrnStr("Currency Code : " + sp.getCurrencyType(), FONT_NORMAL, AlignEnum.LEFT, true);
|
||||
printer.appendPrnStr("\n--------------------------------\n", FONT_NORMAL, AlignEnum.LEFT, false);
|
||||
}
|
||||
|
||||
printer.startPrint(true, ret -> {
|
||||
Log.d("Print", "Print result = " + ret);
|
||||
});
|
||||
}
|
||||
|
||||
private String[] splitIpAndPort(String raw) {
|
||||
if (raw == null || raw.trim().isEmpty()) {
|
||||
return new String[]{"", ""};
|
||||
}
|
||||
|
||||
raw = raw.trim();
|
||||
|
||||
// If starts with http/https
|
||||
if (raw.startsWith("http://") || raw.startsWith("https://")) {
|
||||
|
||||
// Attempt to extract host + port via URL
|
||||
try {
|
||||
java.net.URL url = new java.net.URL(raw);
|
||||
|
||||
String host = url.getHost(); // hostname or IP
|
||||
int port = url.getPort(); // -1 if no port
|
||||
String path = url.getPath(); // /api or /
|
||||
|
||||
// If port exists → split normally
|
||||
if (port != -1) {
|
||||
return new String[]{
|
||||
host, // e.g. 10.10.10.10
|
||||
String.valueOf(port) // e.g. 5000
|
||||
};
|
||||
}
|
||||
|
||||
// No port → do NOT split
|
||||
return new String[]{ raw, "" };
|
||||
|
||||
} catch (Exception e) {
|
||||
// fail-safe: do not split
|
||||
return new String[]{ raw, "" };
|
||||
}
|
||||
}
|
||||
|
||||
// Normal "IP:Port" split
|
||||
int idx = raw.lastIndexOf(":");
|
||||
|
||||
if (idx == -1) {
|
||||
return new String[]{ raw, "" };
|
||||
}
|
||||
|
||||
return new String[]{
|
||||
raw.substring(0, idx),
|
||||
raw.substring(idx + 1)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
private void printLogo(Bitmap logoBitmap) {
|
||||
try {
|
||||
if (logoBitmap == null || printer == null) return;
|
||||
|
||||
Bitmap bmp = logoBitmap;
|
||||
|
||||
// Max printable width = 384px
|
||||
if (bmp.getWidth() > 384) {
|
||||
int newHeight = (int) (bmp.getHeight() * (384f / bmp.getWidth()));
|
||||
bmp = Bitmap.createScaledBitmap(bmp, 384, newHeight, true);
|
||||
}
|
||||
|
||||
printer.appendPrnStr("\n", FONT_NORMAL, AlignEnum.CENTER, false);
|
||||
printer.appendImage(bmp, AlignEnum.CENTER);
|
||||
printer.appendPrnStr("\n", FONT_NORMAL, AlignEnum.CENTER, false);
|
||||
|
||||
} catch (Exception e) {
|
||||
Log.e("PRINT", "Logo error: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package com.utsmm.kbz.ui.settings;
|
||||
|
||||
public class HostConfigItem {
|
||||
public String name;
|
||||
public String ip;
|
||||
public String mid;
|
||||
public String tid;
|
||||
public String secHostName;
|
||||
public String secHostIp;
|
||||
public String secHostMid;
|
||||
public String secHostTid;
|
||||
|
||||
public HostConfigItem(
|
||||
String name,
|
||||
String ip,
|
||||
String mid,
|
||||
String tid,
|
||||
String secHostName,
|
||||
String secHostIp,
|
||||
String secHostMid,
|
||||
String secHostTid
|
||||
){
|
||||
this.name = name;
|
||||
this.ip = ip;
|
||||
this.mid = mid;
|
||||
this.tid = tid;
|
||||
this.secHostName = secHostName;
|
||||
this.secHostIp = secHostIp;
|
||||
this.secHostMid = secHostMid;
|
||||
this.secHostTid = secHostTid;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,123 @@
|
||||
package com.utsmm.kbz.ui.settings;
|
||||
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
import com.utsmyanmar.paylibs.utils.core_utils.SystemParamsOperation;
|
||||
|
||||
public class HostConfigViewModel extends ViewModel {
|
||||
|
||||
public MutableLiveData<String> merchantName = new MutableLiveData<>();
|
||||
public MutableLiveData<String> merchantPhone = new MutableLiveData<>();
|
||||
public MutableLiveData<String> merchantAddress1 = new MutableLiveData<>();
|
||||
public MutableLiveData<String> merchantAddress2 = new MutableLiveData<>();
|
||||
|
||||
// Primary Host
|
||||
public MutableLiveData<String> hostName = new MutableLiveData<>();
|
||||
public MutableLiveData<String> tid = new MutableLiveData<>();
|
||||
public MutableLiveData<String> mid = new MutableLiveData<>();
|
||||
public MutableLiveData<String> primaryIp = new MutableLiveData<>();
|
||||
public MutableLiveData<String> primaryPort = new MutableLiveData<>();
|
||||
public MutableLiveData<String> secondaryIp = new MutableLiveData<>();
|
||||
public MutableLiveData<String> secondaryPort = new MutableLiveData<>();
|
||||
public MutableLiveData<String> currencyCode = new MutableLiveData<>();
|
||||
|
||||
// Secondary Host
|
||||
public MutableLiveData<String> secHostName = new MutableLiveData<>();
|
||||
public MutableLiveData<String> secHostTid = new MutableLiveData<>();
|
||||
public MutableLiveData<String> secHostMid = new MutableLiveData<>();
|
||||
public MutableLiveData<String> secHostPrimaryIp = new MutableLiveData<>();
|
||||
public MutableLiveData<String> secHostPrimaryPort = new MutableLiveData<>();
|
||||
public MutableLiveData<String> secHostSecondaryIp = new MutableLiveData<>();
|
||||
public MutableLiveData<String> secHostSecondaryPort = new MutableLiveData<>();
|
||||
|
||||
|
||||
public void loadConfig() {
|
||||
|
||||
SystemParamsOperation sp = SystemParamsOperation.getInstance();
|
||||
|
||||
// Merchant Info
|
||||
merchantName.setValue(sp.getMerchantName());
|
||||
merchantPhone.setValue(sp.getMerchantPhoneNo());
|
||||
merchantAddress1.setValue(sp.getMerchantAddress());
|
||||
merchantAddress2.setValue(sp.getMerchantAddress2());
|
||||
|
||||
// PRIMARY HOST
|
||||
hostName.setValue(sp.getHostName());
|
||||
tid.setValue(sp.getTerminalId());
|
||||
mid.setValue(sp.getMerchantId());
|
||||
|
||||
String[] pri = split(sp.getIpAddress());
|
||||
primaryIp.setValue(pri[0]);
|
||||
primaryPort.setValue(pri[1]);
|
||||
|
||||
String[] sec = split(sp.getSecIpAddress());
|
||||
secondaryIp.setValue(sec[0]);
|
||||
secondaryPort.setValue(sec[1]);
|
||||
|
||||
currencyCode.setValue(sp.getCurrencyType() != null ? sp.getCurrencyType().toString() : "");
|
||||
|
||||
|
||||
if (sp.getSecHostName() != null && !sp.getSecHostName().isEmpty()) {
|
||||
|
||||
secHostName.setValue(sp.getSecHostName());
|
||||
secHostTid.setValue(sp.getSecHostTerminalId());
|
||||
secHostMid.setValue(sp.getSecHostMerchantId());
|
||||
|
||||
String[] shp = split(sp.getSecHostIpAddress());
|
||||
secHostPrimaryIp.setValue(shp[0]);
|
||||
secHostPrimaryPort.setValue(shp[1]);
|
||||
|
||||
String[] shs = split(sp.getSecHostSecIpAddress());
|
||||
secHostSecondaryIp.setValue(shs[0]);
|
||||
secHostSecondaryPort.setValue(shs[1]);
|
||||
}
|
||||
}
|
||||
|
||||
private String[] split(String raw) {
|
||||
if (raw == null || raw.trim().isEmpty()) {
|
||||
return new String[]{"", ""};
|
||||
}
|
||||
|
||||
raw = raw.trim();
|
||||
|
||||
// If starts with http/https
|
||||
if (raw.startsWith("http://") || raw.startsWith("https://")) {
|
||||
|
||||
// Attempt to extract host + port via URL
|
||||
try {
|
||||
java.net.URL url = new java.net.URL(raw);
|
||||
|
||||
String host = url.getHost(); // hostname or IP
|
||||
int port = url.getPort(); // -1 if no port
|
||||
String path = url.getPath(); // /api or /
|
||||
|
||||
// If port exists → split normally
|
||||
if (port != -1) {
|
||||
return new String[]{
|
||||
host, // e.g. 10.10.10.10
|
||||
String.valueOf(port) // e.g. 5000
|
||||
};
|
||||
}
|
||||
|
||||
// No port → do NOT split
|
||||
return new String[]{ raw, "" };
|
||||
|
||||
} catch (Exception e) {
|
||||
// fail-safe: do not split
|
||||
return new String[]{ raw, "" };
|
||||
}
|
||||
}
|
||||
|
||||
// Normal "IP:Port" split
|
||||
int idx = raw.lastIndexOf(":");
|
||||
|
||||
if (idx == -1) {
|
||||
return new String[]{ raw, "" };
|
||||
}
|
||||
|
||||
return new String[]{
|
||||
raw.substring(0, idx),
|
||||
raw.substring(idx + 1)
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,193 @@
|
||||
package com.utsmm.kbz.ui.settings;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.nexgo.downloadkey.downloadflow.DownloadFEntity;
|
||||
import com.nexgo.downloadkey.downloadflow.DownloadFlow;
|
||||
import com.nexgo.downloadkey.downloadflow.DownloadFlowProcessListener;
|
||||
import com.nexgo.downloadkey.downloadflow.DownloadFlowResultEntity;
|
||||
import com.nexgo.downloadkey.downloadflow.DownloadResult;
|
||||
import com.utsmyanmar.baselib.fragment.DataBindingFragment;
|
||||
import com.utsmyanmar.baselib.util.DataBindingConfig;
|
||||
import com.utsmyanmar.paylibs.utils.core_utils.SystemParamsOperation;
|
||||
import com.utsmm.kbz.BR;
|
||||
import com.utsmm.kbz.R;
|
||||
import com.utsmm.kbz.databinding.FragmentInjectKeyBinding;
|
||||
import com.utsmyanmar.paylibs.utils.LogUtil;
|
||||
import com.utsmm.kbz.util.tms.TMSUtil;
|
||||
|
||||
public class InjectKeyFragment extends DataBindingFragment {
|
||||
|
||||
private static final String TAG = InjectKeyFragment.class.getSimpleName();
|
||||
|
||||
// Data binding will handle view access automatically
|
||||
private FragmentInjectKeyBinding binding;
|
||||
|
||||
// Key injection variables
|
||||
private DownloadFlow mDownloadFlow;
|
||||
private int keyIndexTmp = 8; // Default key index
|
||||
|
||||
@Override
|
||||
protected void initViewModel() {
|
||||
// No specific viewmodels needed for this fragment
|
||||
}
|
||||
|
||||
@Override
|
||||
protected DataBindingConfig getDataBindingConfig() {
|
||||
// This is the key method that links the XML and fragment properly
|
||||
return new DataBindingConfig(R.layout.fragment_inject_key, 0, null)
|
||||
.addBindingParam(BR.click, new ClickEvent());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int currentId() {
|
||||
return R.id.injectKeyFragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int hostId() {
|
||||
return R.id.nav_host_fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int routeId() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
try {
|
||||
|
||||
// Get the binding from the base class - this is automatically created
|
||||
binding = (FragmentInjectKeyBinding) mBinding;
|
||||
|
||||
updateConfigurationInfo();
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
setToolBarTitleWithBackIcon("Inject Key");
|
||||
|
||||
}
|
||||
|
||||
private void updateConfigurationInfo() {
|
||||
|
||||
String terminalId = SystemParamsOperation.getInstance().getTerminalId();
|
||||
binding.terminalIdValue.setText(terminalId != null && !terminalId.isEmpty() ?
|
||||
terminalId : "Not configured");
|
||||
|
||||
// Update Merchant ID
|
||||
String merchantId = SystemParamsOperation.getInstance().getMerchantId();
|
||||
binding.merchantIdValue.setText(merchantId != null && !merchantId.isEmpty() ?
|
||||
merchantId : "Not configured");
|
||||
|
||||
// Update Serial Number
|
||||
String serialNo = TMSUtil.getInstance().getSerialNumber();
|
||||
binding.serialNumberValue.setText(serialNo != null && !serialNo.isEmpty() ?
|
||||
serialNo : "Not configured");
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void loadKeyFromKeyPOS() {
|
||||
try {
|
||||
if (TextUtils.isEmpty(binding.etKeyIndex.getText())) {
|
||||
Toast.makeText(getContext(), "Please input key index", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
String keyIndexText = binding.etKeyIndex.getText().toString().trim();
|
||||
|
||||
try {
|
||||
keyIndexTmp = Integer.parseInt(keyIndexText);
|
||||
} catch (NumberFormatException e) {
|
||||
Toast.makeText(getContext(), "Invalid key index format", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
showLoadingDialog("Loading key...");
|
||||
|
||||
mDownloadFlow = DownloadFlow.getInstance();
|
||||
|
||||
String terminalId = SystemParamsOperation.getInstance().getTerminalId();
|
||||
String merchantId = SystemParamsOperation.getInstance().getMerchantId();
|
||||
String serialNo = TMSUtil.getInstance().getSerialNumber();
|
||||
|
||||
// Validate configuration
|
||||
if (TextUtils.isEmpty(terminalId) || TextUtils.isEmpty(merchantId) || TextUtils.isEmpty(serialNo)) {
|
||||
dismissLoadingDialog();
|
||||
showDeclineDialog("Please configure Terminal ID, Merchant ID first in TMS Configuration");
|
||||
return;
|
||||
}
|
||||
|
||||
final DownloadFEntity downloadFEntity = new DownloadFEntity();
|
||||
downloadFEntity.setSn(serialNo.getBytes());
|
||||
downloadFEntity.setMid(merchantId.getBytes());
|
||||
downloadFEntity.setTid(terminalId.getBytes());
|
||||
downloadFEntity.setTmkIndex(keyIndexTmp);
|
||||
downloadFEntity.setPort(0);
|
||||
downloadFEntity.setTimeOut(10);
|
||||
|
||||
int result = mDownloadFlow.startLoadKey(getActivity(), downloadFEntity, onDownloadFlowProcessListener);
|
||||
if (result != DownloadResult.Success) {
|
||||
dismissLoadingDialog();
|
||||
showDeclineDialog("Failed to start key injection process");
|
||||
LogUtil.e(TAG, "Failed to start key injection, result: " + result);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
dismissLoadingDialog();
|
||||
LogUtil.e(TAG, "Error in key injection: " + e.getMessage());
|
||||
showDeclineDialog("Error occurred during key injection: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private DownloadFlowProcessListener onDownloadFlowProcessListener = new DownloadFlowProcessListener() {
|
||||
@Override
|
||||
public void onFinish(int ret, DownloadFlowResultEntity downloadFlowResultEntity) {
|
||||
try {
|
||||
dismissLoadingDialog();
|
||||
|
||||
if (ret == DownloadResult.Success) {
|
||||
// Show success dialog with key index
|
||||
showSuccessDialog("Key injection successful!\nKey Index: " + keyIndexTmp);
|
||||
LogUtil.d(TAG, "Key injection successful for index: " + keyIndexTmp);
|
||||
} else {
|
||||
// Show decline dialog
|
||||
showDeclineDialog("Key injection failed!\nError code: " + ret);
|
||||
LogUtil.e(TAG, "Key injection failed with error code: " + ret);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtil.e(TAG, "Error handling injection result: " + e.getMessage());
|
||||
showDeclineDialog("Error processing injection result");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// ClickEvent class for data binding - this is the proper pattern
|
||||
public class ClickEvent {
|
||||
|
||||
public void onInjectKeyClick() {
|
||||
try {
|
||||
LogUtil.d(TAG, "Inject key button clicked");
|
||||
loadKeyFromKeyPOS();
|
||||
} catch (Exception e) {
|
||||
LogUtil.e(TAG, "Error in inject key click: " + e.getMessage());
|
||||
showDeclineDialog("Error occurred: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -85,6 +85,50 @@ public class EReceiptUtil {
|
||||
|
||||
|
||||
|
||||
return request;
|
||||
}
|
||||
|
||||
public EReceiptRequest generateQRRefundReceipt(PayDetail payDetail, TransResultStatus status) {
|
||||
|
||||
double realAmount = payDetail.getAmount() / 100.0;
|
||||
DecimalFormat df = new DecimalFormat("0.00");
|
||||
String amount = df.format(realAmount);
|
||||
|
||||
String currentTimeStamp = new java.text.SimpleDateFormat("MMddHHmmss", java.util.Locale.getDefault())
|
||||
.format(new java.util.Date());
|
||||
EReceiptRequest request = new EReceiptRequest();
|
||||
request.setDE3("QRV");
|
||||
|
||||
request.setDE7(currentTimeStamp);
|
||||
request.setDE37(payDetail.getReferNo());
|
||||
|
||||
request.setDE49("MMK");
|
||||
request.setSerial(serialNum);
|
||||
request.setAppId(packageName);
|
||||
request.setDE41(terminalId);
|
||||
request.setDE42(merchantId);
|
||||
request.setInvoiceNumber(payDetail.getInvoiceNo());
|
||||
request.setDE11(payDetail.getVoucherNo());
|
||||
|
||||
// need to add payment identifier field too
|
||||
|
||||
if(status == TransResultStatus.SUCCESS) {
|
||||
request.setDE4(amount);
|
||||
request.setDescription("qr refund success");
|
||||
request.setDE39("A");
|
||||
} else if(status == TransResultStatus.TIME_OUT) {
|
||||
request.setDE4("0");
|
||||
request.setDescription("qr refund timeout");
|
||||
request.setDE39("D");
|
||||
} else if(status == TransResultStatus.FAIL) {
|
||||
request.setDE4("0");
|
||||
request.setDescription("qr refund failed");
|
||||
request.setDE39("E");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return request;
|
||||
}
|
||||
|
||||
@ -99,25 +143,38 @@ public class EReceiptUtil {
|
||||
EReceiptRequest request = new EReceiptRequest();
|
||||
|
||||
request.setDE3(convertTransactionType(payDetail.getTransactionType()));
|
||||
|
||||
request.setDE7(currentTimeStamp);
|
||||
request.setDE11(payDetail.getVoucherNo());
|
||||
|
||||
if(payDetail.getTransactionType() == TransactionsType.SETTLEMENT.value) {
|
||||
SettleData settleData = payDetail.getSettleDataObj();
|
||||
|
||||
long totalAmt = settleData.getSaleAmount() + settleData.getRefundAmount() + settleData.getPreAuthCompAmount() + settleData.getCashAdvanceAmount();
|
||||
double realTotalAmount = totalAmt / 100.0;
|
||||
String totalAmount = df.format(realTotalAmount);
|
||||
request.setDE4(totalAmount);
|
||||
|
||||
|
||||
request.setDE63_01(settleData.getSaleCount()+"");
|
||||
request.setDE63_02(settleData.getSaleAmount()+"");
|
||||
request.setDE63_03(settleData.getRefundCount()+"");
|
||||
request.setDE63_04(settleData.getRefundAmount()+"");
|
||||
|
||||
request.setDE63_05(settleData.getPreAuthCompCount()+"");
|
||||
request.setDE63_06(settleData.getPreAuthCompAmount()+"");
|
||||
request.setDE63_07(settleData.getCashAdvanceCount()+"");
|
||||
request.setDE63_08(settleData.getCashAdvanceAmount()+"");
|
||||
invoiceNo = SystemParamsOperation.getInstance().getIncrementInvoiceNum();
|
||||
request.setBatchNumber(batchNumber);
|
||||
request.setInvoiceNumber(invoiceNo);
|
||||
request.setDescription("success");
|
||||
request.setDE39("A");
|
||||
request.setDE37("0000");
|
||||
request.setDE49("MMK");
|
||||
} else {
|
||||
request.setDE2(POSUtil.getInstance().getCardNumMasking(payDetail.getCardNo()));
|
||||
|
||||
request.setDE4(amount);
|
||||
request.setDE7(currentTimeStamp);
|
||||
request.setDE11(payDetail.getVoucherNo());
|
||||
|
||||
|
||||
request.setDE37(payDetail.getReferNo());
|
||||
request.setDE38(payDetail.getApprovalCode());
|
||||
|
||||
28
app/src/main/res/drawable/honey.xml
Normal file
28
app/src/main/res/drawable/honey.xml
Normal file
@ -0,0 +1,28 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="200dp"
|
||||
android:height="200dp"
|
||||
android:viewportWidth="100"
|
||||
android:viewportHeight="100">
|
||||
|
||||
<path
|
||||
android:fillColor="@color/white"
|
||||
android:strokeColor="@color/white"
|
||||
android:strokeWidth="1"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeLineCap="round"
|
||||
android:pathData="
|
||||
M55.1858,3.015
|
||||
L87.8142,21.985
|
||||
Q93,25 93,31
|
||||
L93,69
|
||||
Q93,75 87.8142,78.015
|
||||
L55.1858,96.985
|
||||
Q50,100 44.8142,96.985
|
||||
L12.1858,78.015
|
||||
Q7,75 7,69
|
||||
L7,31
|
||||
Q7,25 12.1858,21.985
|
||||
L44.8142,3.015
|
||||
Q50,0 55.1858,3.015
|
||||
Z" />
|
||||
</vector>
|
||||
35
app/src/main/res/drawable/ic_dash_report.xml
Normal file
35
app/src/main/res/drawable/ic_dash_report.xml
Normal file
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="422.074"
|
||||
android:viewportHeight="422.073">
|
||||
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M229.001,392.729H44.522V27.274h198.907V82.69c0,5.6,4.534,10.133,10.131,10.133h53.791l0.009,181.564c9.418,0.215,18.602,1.963,27.266,5.188V77.743c0,-2.168,-0.863,-4.248,-2.396,-5.787L262.667,2.395C261.133,0.862,259.053,0,256.881,0H41.796C28.262,0,17.25,11.008,17.25,24.543v370.915c0,13.533,11.012,24.543,24.547,24.543h206.973C240.466,412.384,233.714,403.114,229.001,392.729z"/>
|
||||
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M404.824,311.648c0,-4.586,-1.785,-8.896,-5.027,-12.142l-12.844,-12.844c-3.244,-3.242,-7.555,-5.027,-12.139,-5.027c-4.582,0,-8.896,1.785,-12.141,5.029l-19.602,19.6c-10.47,-7.506,-23.304,-11.928,-37.168,-11.928c-35.273,0,-63.867,28.596,-63.867,63.869c0,35.271,28.594,63.867,63.867,63.867c35.271,0,63.867,-28.597,63.867,-63.867c0,-1.43,-0.051,-2.848,-0.145,-4.254l30.166,-30.166C403.039,320.546,404.824,316.232,404.824,311.648z M385.857,315.467l-61.43,61.428c-1.295,1.296,-3.051,2.021,-4.881,2.021h-0.002c-1.832,0,-3.588,-0.729,-4.881,-2.023l-28.465,-28.51c-2.691,-2.693,-2.689,-7.062,0.002,-9.758l5.483,-5.479c2.69,-2.693,7.058,-2.695,9.755,-0.007l18.104,18.058l51.019,-51.021c1.296,-1.296,3.052,-2.021,4.882,-2.021s3.586,0.727,4.881,2.021l5.531,5.53C388.552,308.4,388.552,312.77,385.857,315.467z"/>
|
||||
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M188.141,108.951l-57.438,13.148l13.149,-57.438c-20.125,-5.047,-42.319,0.296,-58.059,16.035c-23.835,23.834,-23.835,62.478,0,86.312c23.835,23.835,62.478,23.835,86.313,0C187.843,151.269,193.187,129.075,188.141,108.951z"/>
|
||||
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M188.689,64.113c-8.097,-8.096,-17.901,-13.439,-28.254,-16.035l-13.149,57.437l57.438,-13.149C202.128,82.014,196.785,72.209,188.689,64.113z"/>
|
||||
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M89.161,249.945h20.993c5.813,0,10.542,-4.729,10.542,-10.543c0,-5.814,-4.729,-10.543,-10.542,-10.543H89.161c-5.813,0,-10.543,4.729,-10.543,10.543C78.618,245.216,83.348,249.945,89.161,249.945z"/>
|
||||
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M170.153,267.859H89.161c-5.813,0,-10.543,4.729,-10.543,10.543c0,5.813,4.729,10.543,10.543,10.543h80.993c5.813,0,10.542,-4.729,10.542,-10.543C180.695,272.588,175.966,267.859,170.153,267.859z"/>
|
||||
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M158.153,306.859H89.161c-5.813,0,-10.543,4.729,-10.543,10.543c0,5.813,4.729,10.543,10.543,10.543h68.993c5.813,0,10.542,-4.729,10.542,-10.543C168.695,311.588,163.966,306.859,158.153,306.859z"/>
|
||||
</vector>
|
||||
53
app/src/main/res/drawable/ic_dash_reports.xml
Normal file
53
app/src/main/res/drawable/ic_dash_reports.xml
Normal file
@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="64"
|
||||
android:viewportHeight="64">
|
||||
|
||||
<!-- Centering shift: moved whole document from x=6 to x=12 -->
|
||||
<!-- Document outline -->
|
||||
<path
|
||||
android:pathData="M12,4 H52 V60 H12 Z"
|
||||
android:fillColor="@android:color/transparent"
|
||||
android:strokeColor="#FFFFFF"
|
||||
android:strokeWidth="2"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeLineCap="round" />
|
||||
|
||||
<!-- Folded corner -->
|
||||
<path
|
||||
android:pathData="M52,4 V16 H42"
|
||||
android:fillColor="@android:color/transparent"
|
||||
android:strokeColor="#FFFFFF"
|
||||
android:strokeWidth="2"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeLineCap="round" />
|
||||
|
||||
<!-- Bar chart (centered as well) -->
|
||||
<path android:pathData="M20,34 H26 V50 H20 Z" android:fillColor="#FFFFFF"/>
|
||||
<path android:pathData="M28,26 H34 V50 H28 Z" android:fillColor="#FFFFFF"/>
|
||||
<path android:pathData="M36,30 H42 V50 H36 Z" android:fillColor="#FFFFFF"/>
|
||||
|
||||
<!-- Text lines -->
|
||||
<path
|
||||
android:pathData="M20,14 H44"
|
||||
android:fillColor="@android:color/transparent"
|
||||
android:strokeColor="#FFFFFF"
|
||||
android:strokeWidth="1.6"
|
||||
android:strokeLineCap="round" />
|
||||
|
||||
<path
|
||||
android:pathData="M20,18 H44"
|
||||
android:fillColor="@android:color/transparent"
|
||||
android:strokeColor="#FFFFFF"
|
||||
android:strokeWidth="1.6"
|
||||
android:strokeLineCap="round" />
|
||||
|
||||
<path
|
||||
android:pathData="M20,22 H32"
|
||||
android:fillColor="@android:color/transparent"
|
||||
android:strokeColor="#FFFFFF"
|
||||
android:strokeWidth="1.6"
|
||||
android:strokeLineCap="round" />
|
||||
</vector>
|
||||
BIN
app/src/main/res/drawable/mmqr_logo.png
Normal file
BIN
app/src/main/res/drawable/mmqr_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 48 KiB |
@ -65,6 +65,7 @@
|
||||
tools:fontFamily="sans-serif-medium" />
|
||||
|
||||
<!-- System PIN Card -->
|
||||
<!-- android:onClick="@{()->click.onSystemPinClick()}"-->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/systemPinCard"
|
||||
android:layout_width="match_parent"
|
||||
@ -72,7 +73,6 @@
|
||||
android:layout_marginBottom="12dp"
|
||||
android:clickable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:onClick="@{()->click.onSystemPinClick()}"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp">
|
||||
@ -141,6 +141,7 @@
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Settings PIN Card -->
|
||||
<!-- android:onClick="@{()->click.onSettingPinClick()}"-->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/settingPinCard"
|
||||
android:layout_width="match_parent"
|
||||
@ -148,7 +149,6 @@
|
||||
android:layout_marginBottom="12dp"
|
||||
android:clickable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:onClick="@{()->click.onSettingPinClick()}"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp">
|
||||
@ -237,6 +237,7 @@
|
||||
tools:fontFamily="sans-serif-medium" />
|
||||
|
||||
<!-- Primary Host IP Card -->
|
||||
<!-- android:onClick="@{()->click.onHostIpClick()}"-->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/hostIpCard"
|
||||
android:layout_width="match_parent"
|
||||
@ -244,7 +245,6 @@
|
||||
android:layout_marginBottom="12dp"
|
||||
android:clickable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:onClick="@{()->click.onHostIpClick()}"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp">
|
||||
@ -313,6 +313,7 @@
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Secondary Host IP Card -->
|
||||
<!-- android:onClick="@{()->click.onSecHostIpClick()}"-->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/secHostIpCard"
|
||||
android:layout_width="match_parent"
|
||||
@ -320,7 +321,6 @@
|
||||
android:layout_marginBottom="12dp"
|
||||
android:clickable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:onClick="@{()->click.onSecHostIpClick()}"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp">
|
||||
@ -389,6 +389,7 @@
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Host Port Card -->
|
||||
<!-- android:onClick="@{()->click.onHostPortClick()}"-->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/hostPortCard"
|
||||
android:layout_width="match_parent"
|
||||
@ -396,7 +397,6 @@
|
||||
android:layout_marginBottom="12dp"
|
||||
android:clickable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:onClick="@{()->click.onHostPortClick()}"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp">
|
||||
@ -485,6 +485,7 @@
|
||||
tools:fontFamily="sans-serif-medium" />
|
||||
|
||||
<!-- Terminal ID Card -->
|
||||
<!-- android:onClick="@{()->click.onTidClick()}"-->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/tidCard"
|
||||
android:layout_width="match_parent"
|
||||
@ -492,7 +493,6 @@
|
||||
android:layout_marginBottom="12dp"
|
||||
android:clickable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:onClick="@{()->click.onTidClick()}"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp">
|
||||
@ -561,6 +561,7 @@
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Merchant ID Card -->
|
||||
<!-- android:onClick="@{()->click.onMidClick()}"-->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/midCard"
|
||||
android:layout_width="match_parent"
|
||||
@ -568,7 +569,6 @@
|
||||
android:layout_marginBottom="12dp"
|
||||
android:clickable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:onClick="@{()->click.onMidClick()}"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp">
|
||||
@ -657,6 +657,7 @@
|
||||
tools:fontFamily="sans-serif-medium" />
|
||||
|
||||
<!-- Save Configuration Card -->
|
||||
<!-- android:onClick="@{()->click.onSaveConfigClick()}"-->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/saveConfigCard"
|
||||
android:layout_width="match_parent"
|
||||
@ -664,7 +665,6 @@
|
||||
android:layout_marginBottom="12dp"
|
||||
android:clickable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:onClick="@{()->click.onSaveConfigClick()}"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp">
|
||||
|
||||
@ -15,36 +15,33 @@
|
||||
<variable name="carouselAdapter" type="androidx.recyclerview.widget.RecyclerView.Adapter"/>
|
||||
<variable name="myAdapter" type="com.utsmm.kbz.ui.adapters.MainAdapter"/>
|
||||
</data>
|
||||
|
||||
|
||||
<!-- ======== ROOT ======== -->
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorPrimary"
|
||||
android:padding="16dp">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/tid"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tidText"
|
||||
android:layout_width="wrap_content"
|
||||
android:id="@+id/serialNumber"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{`TID : ` + shareViewModel.terminalId}'
|
||||
tools:text="TID : 123456789"
|
||||
android:layout_margin="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/bannerCard" />
|
||||
</FrameLayout>
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="S/N : N86PW500019"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:text='@{"S/N : " + shareViewModel.serialNumber}'
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
|
||||
<!-- ====================== BANNER ====================== -->
|
||||
|
||||
@ -52,13 +49,13 @@
|
||||
android:id="@+id/bannerCard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="4dp"
|
||||
android:layout_margin="16dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="6dp"
|
||||
app:layout_constraintDimensionRatio="16:6"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/tid"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tid">
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/serialNumber">
|
||||
|
||||
<com.denzcoskun.imageslider.ImageSlider
|
||||
android:id="@+id/image_slider"
|
||||
@ -78,83 +75,227 @@
|
||||
android:id="@+id/menuGrid"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/bannerCard"
|
||||
android:paddingTop="12dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
>
|
||||
<!-- ===== FULL WIDTH SALE BUTTON ===== -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/cardMenuCard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:cardCornerRadius="18dp"
|
||||
app:cardElevation="4dp"
|
||||
android:layout_margin="6dp"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
android:onClick="@{() -> click.onClickCard()}"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/bannerCard"
|
||||
app:layout_constraintVertical_bias="1.0">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/btn1"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginTop="45dp"
|
||||
android:background="@drawable/honey"
|
||||
app:layout_constraintBottom_toTopOf="@+id/btn3"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintDimensionRatio="1:0.4">
|
||||
android:onClick="@{() -> click.onClickCard()}">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="20dp"
|
||||
android:background="@color/white">
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:src="@drawable/ic_sale"
|
||||
app:tint="@color/colorPrimary"
|
||||
android:layout_marginBottom="6dp" />
|
||||
app:tint="@color/colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:text="@string/menu_sale"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:textAlignment="center" />
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<!-- ===== ROW 1 ===== -->
|
||||
|
||||
<!-- Settlement -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/settlementMenuCard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:cardCornerRadius="18dp"
|
||||
app:cardElevation="4dp"
|
||||
android:layout_margin="6dp"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
android:onClick="@{() -> click.onClickSettlement()}"
|
||||
app:disableBtn="@{mainViewModel.settlementStatus}"
|
||||
app:layout_constraintTop_toBottomOf="@id/cardMenuCard"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/signOnMenuCard"
|
||||
app:layout_constraintDimensionRatio="1:0.8">
|
||||
<FrameLayout
|
||||
android:id="@+id/btn2"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginTop="45dp"
|
||||
android:layout_marginEnd="60dp"
|
||||
android:background="@drawable/honey"
|
||||
app:layout_constraintBottom_toTopOf="@+id/bt4"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:clickable="@{mainViewModel.kPayStatus}"
|
||||
android:focusable="@{mainViewModel.kPayStatus}"
|
||||
android:alpha="@{mainViewModel.kPayStatus ? 1f : 0.5f}"
|
||||
android:onClick="@{() -> click.onClickQR()}">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="18dp">
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="46dp"
|
||||
android:layout_height="46dp"
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:src="@drawable/mmqr_logo"
|
||||
/>
|
||||
|
||||
<!-- <TextView-->
|
||||
<!-- android:layout_width="wrap_content"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- android:fontFamily="@font/rubik_medium"-->
|
||||
<!-- android:text="@string/qr_pay"-->
|
||||
<!-- android:textAlignment="center"-->
|
||||
<!-- android:textColor="@color/colorPrimary"-->
|
||||
<!-- android:textSize="14sp"-->
|
||||
<!-- android:textStyle="bold" />-->
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/btn3"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:background="@drawable/honey"
|
||||
android:onClick="@{() -> click.onClickVoid()}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/bt4"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:src="@drawable/ic_void_dash"
|
||||
app:tint="@color/colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:text="Void"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/bt4"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:background="@drawable/honey"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:onClick="@{() -> click.onClickSignOn()}"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@drawable/ic_signon"
|
||||
android:layout_marginBottom="6dp"
|
||||
app:tint="@color/colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:text="@string/menu_sign_on"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/bt5"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:background="@drawable/honey"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/bt4"
|
||||
android:onClick="@{() -> click.onClickReport()}"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:src="@drawable/ic_dash_report"
|
||||
app:tint="@color/colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:text="Reports"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/bt6"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginBottom="45dp"
|
||||
android:background="@drawable/honey"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/bt4"
|
||||
android:clickable="@{mainViewModel.settlementStatus}"
|
||||
android:focusable="@{mainViewModel.settlementStatus}"
|
||||
android:alpha="@{mainViewModel.settlementStatus ? 1f : 0.5f}"
|
||||
android:onClick="@{() -> click.onClickSettlement()}">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:src="@drawable/ic_settlement"
|
||||
app:tint="@color/colorPrimary" />
|
||||
@ -162,146 +303,53 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:text="@string/menu_settlement"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:textAlignment="center" />
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<!-- Sign On -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/signOnMenuCard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:cardCornerRadius="18dp"
|
||||
app:cardElevation="4dp"
|
||||
android:layout_margin="6dp"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
android:onClick="@{() -> click.onClickSignOn()}"
|
||||
app:layout_constraintTop_toBottomOf="@id/cardMenuCard"
|
||||
app:layout_constraintStart_toEndOf="@id/settlementMenuCard"
|
||||
<FrameLayout
|
||||
android:id="@+id/bt7"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginEnd="60dp"
|
||||
android:layout_marginBottom="45dp"
|
||||
android:background="@drawable/honey"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintDimensionRatio="1:0.8">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="18dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="46dp"
|
||||
android:layout_height="46dp"
|
||||
android:src="@drawable/ic_signon"
|
||||
app:tint="@color/colorPrimary"
|
||||
android:layout_marginBottom="6dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/menu_sign_on"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:textAlignment="center" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
<!-- ===== ROW 2 ===== -->
|
||||
|
||||
<!-- Transactions -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/otherFeaturesCard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:cardCornerRadius="18dp"
|
||||
app:cardElevation="4dp"
|
||||
android:layout_margin="6dp"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
android:onClick="@{() -> click.onClickTrans()}"
|
||||
app:layout_constraintTop_toBottomOf="@id/settlementMenuCard"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/qrPayMenuCard"
|
||||
app:layout_constraintDimensionRatio="1:0.8">
|
||||
app:layout_constraintTop_toBottomOf="@+id/bt4">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:padding="18dp">
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="46dp"
|
||||
android:layout_height="46dp"
|
||||
android:layout_width="39dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginBottom="6dp"
|
||||
android:src="@drawable/ic_other_features"
|
||||
app:tint="@color/colorPrimary"
|
||||
android:layout_marginBottom="6dp" />
|
||||
app:tint="@color/colorPrimary" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/menu_transactions"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:text="@string/dash_see_more"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:textAlignment="center" />
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<!-- QR Pay -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/qrPayMenuCard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:cardCornerRadius="18dp"
|
||||
app:cardElevation="4dp"
|
||||
android:layout_margin="6dp"
|
||||
android:foreground="?attr/selectableItemBackground"
|
||||
android:onClick="@{() -> click.onClickQR()}"
|
||||
app:disableBtn="@{mainViewModel.kPayStatus}"
|
||||
app:layout_constraintTop_toBottomOf="@id/signOnMenuCard"
|
||||
app:layout_constraintStart_toEndOf="@id/otherFeaturesCard"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintDimensionRatio="1:0.8">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="18dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="46dp"
|
||||
android:layout_height="46dp"
|
||||
android:src="@drawable/ic_mmqr"
|
||||
android:layout_marginBottom="6dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/menu_qrpay"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:textAlignment="center" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
206
app/src/main/res/layout/fragment_host_config.xml
Normal file
206
app/src/main/res/layout/fragment_host_config.xml
Normal file
@ -0,0 +1,206 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:bind="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
<import type="android.view.View"/>
|
||||
<import type="android.text.TextUtils" />
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.utsmm.kbz.ui.settings.HostConfigViewModel" />
|
||||
<variable
|
||||
name="click"
|
||||
type="com.utsmm.kbz.ui.settings.HostConfigFragment.ClickHandler" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="16dp">
|
||||
|
||||
<!-- CARD SECTION -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/hostCard"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/actionButtons"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_edittext_primary_border"
|
||||
android:padding="16dp">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true"
|
||||
android:scrollbars="none">
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<!-- HEADER -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="TERMINAL CONFIGURATION"
|
||||
android:gravity="center"
|
||||
android:textStyle="bold"
|
||||
android:textSize="18sp"
|
||||
android:paddingBottom="12dp"/>
|
||||
|
||||
<!-- Merchant Info -->
|
||||
<TextView android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
android:text="@{viewModel.merchantName}" />
|
||||
|
||||
<TextView android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
android:text="@{viewModel.merchantPhone}" />
|
||||
|
||||
<TextView android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
android:text="@{viewModel.merchantAddress1}" />
|
||||
|
||||
<TextView android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
android:text="@{viewModel.merchantAddress2}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="--------------------------------"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"/>
|
||||
|
||||
<!-- PRIMARY HOST -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="PRIMARY HOST"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
android:text='@{"Name : " + viewModel.hostName}' />
|
||||
|
||||
<TextView android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
android:text='@{"TID : " + viewModel.tid}' />
|
||||
|
||||
<TextView android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
android:text='@{"MID : " + viewModel.mid}' />
|
||||
|
||||
<TextView android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
android:text='@{"Primary Ip : " + viewModel.primaryIp}' />
|
||||
|
||||
<TextView android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
android:text='@{"Primary Port : " + viewModel.primaryPort}' />
|
||||
|
||||
<TextView android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
android:text='@{"Secondary Ip : " + viewModel.secondaryIp}' />
|
||||
|
||||
<TextView android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
android:text='@{"Secondary Port : " + viewModel.secondaryPort}' />
|
||||
|
||||
<TextView android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
android:text='@{"Currency Code : " + viewModel.currencyCode}' />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="--------------------------------"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"/>
|
||||
|
||||
<!-- SECONDARY HOST (only if exists) -->
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility='@{!viewModel.secHostName.isEmpty() ? View.VISIBLE : View.GONE}'>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="SECONDARY HOST"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
android:text='@{"Name : " + viewModel.secHostName}' />
|
||||
|
||||
<TextView android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
android:text='@{"TID : " + viewModel.secHostTid}' />
|
||||
|
||||
<TextView android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
android:text='@{"MID : " + viewModel.secHostMid}' />
|
||||
|
||||
<TextView android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
android:text='@{"Primary Ip : " + viewModel.secHostPrimaryIp}' />
|
||||
|
||||
<TextView android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
android:text='@{"Primary Port : " + viewModel.secHostPrimaryPort}' />
|
||||
|
||||
<TextView android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
android:text='@{"Secondary Ip : " + viewModel.secHostSecondaryIp}' />
|
||||
|
||||
<TextView android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
android:text='@{"Secondary Port : " + viewModel.secHostSecondaryPort}' />
|
||||
|
||||
<TextView android:layout_width="match_parent" android:layout_height="wrap_content"
|
||||
android:text='@{"Currency Code : " + viewModel.currencyCode}' />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="--------------------------------"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
</FrameLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
<!-- ACTION BUTTONS -->
|
||||
<LinearLayout
|
||||
android:id="@+id/actionButtons"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="52dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="Cancel"
|
||||
android:onClick="@{()-> click.onCancel()}"
|
||||
android:background="@drawable/bg_rounded_btn_cancel_cv"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textStyle="bold"/>
|
||||
|
||||
<Button
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="52dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="Print"
|
||||
android:onClick="@{()-> click.onPrint()}"
|
||||
android:background="@drawable/bg_rounded_btn_cv"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold"/>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
||||
352
app/src/main/res/layout/fragment_inject_key.xml
Normal file
352
app/src/main/res/layout/fragment_inject_key.xml
Normal file
@ -0,0 +1,352 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="click"
|
||||
type="com.utsmm.kbz.ui.settings.InjectKeyFragment.ClickEvent" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorBackground">
|
||||
|
||||
<!-- Modern Header -->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/headerContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/colorPrimary"
|
||||
android:elevation="8dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<!-- Main Content Scroll View -->
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:fillViewport="true"
|
||||
android:paddingHorizontal="20dp"
|
||||
android:paddingTop="20dp"
|
||||
android:paddingBottom="20dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/headerContainer">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- Key Configuration Section -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:text="Key Injection Configuration"
|
||||
android:textColor="@color/colorTextTitle"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
tools:fontFamily="sans-serif-medium" />
|
||||
|
||||
<!-- Key Index Input Card -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/keyIndexCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:text="Key Index"
|
||||
android:textColor="@color/colorTextTitle"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
tools:fontFamily="sans-serif-medium" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:fontFamily="@font/rubik_regular"
|
||||
android:text="Enter the key index for injection"
|
||||
android:textColor="@color/colorTextContent"
|
||||
android:textSize="14sp"
|
||||
tools:fontFamily="sans-serif" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="Key Index"
|
||||
app:boxBackgroundMode="outline"
|
||||
app:boxCornerRadiusBottomEnd="8dp"
|
||||
app:boxCornerRadiusBottomStart="8dp"
|
||||
app:boxCornerRadiusTopEnd="8dp"
|
||||
app:boxCornerRadiusTopStart="8dp"
|
||||
app:boxStrokeColor="@color/colorPrimary">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/etKeyIndex"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/rubik_regular"
|
||||
android:inputType="number"
|
||||
android:maxLength="2"
|
||||
android:textColor="@color/colorTextTitle"
|
||||
android:textSize="16sp"
|
||||
tools:fontFamily="sans-serif" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Current Configuration Info Card -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/configInfoCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:text="Current Configuration"
|
||||
android:textColor="@color/colorTextTitle"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
tools:fontFamily="sans-serif-medium" />
|
||||
|
||||
<!-- Terminal ID -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/rubik_regular"
|
||||
android:text="Terminal ID:"
|
||||
android:textColor="@color/colorTextContent"
|
||||
android:textSize="14sp"
|
||||
tools:fontFamily="sans-serif" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/terminalIdValue"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:text="Not configured"
|
||||
android:textColor="@color/colorTextTitle"
|
||||
android:textSize="14sp"
|
||||
tools:fontFamily="sans-serif-medium" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Merchant ID -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/rubik_regular"
|
||||
android:text="Merchant ID:"
|
||||
android:textColor="@color/colorTextContent"
|
||||
android:textSize="14sp"
|
||||
tools:fontFamily="sans-serif" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/merchantIdValue"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:text="Not configured"
|
||||
android:textColor="@color/colorTextTitle"
|
||||
android:textSize="14sp"
|
||||
tools:fontFamily="sans-serif-medium" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Serial Number -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/rubik_regular"
|
||||
android:text="Serial Number:"
|
||||
android:textColor="@color/colorTextContent"
|
||||
android:textSize="14sp"
|
||||
tools:fontFamily="sans-serif" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/serialNumberValue"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:text="Not configured"
|
||||
android:textColor="@color/colorTextTitle"
|
||||
android:textSize="14sp"
|
||||
tools:fontFamily="sans-serif-medium" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Actions Section -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:text="Actions"
|
||||
android:textColor="@color/colorTextTitle"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
tools:fontFamily="sans-serif-medium" />
|
||||
|
||||
<!-- Inject Key Button Card -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/injectKeyCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:clickable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:onClick="@{()->click.onInjectKeyClick()}"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="20dp">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:cardBackgroundColor="@color/colorPrimary"
|
||||
app:cardCornerRadius="24dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_lock"
|
||||
app:tint="@color/white" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:text="Start Key Injection"
|
||||
android:textColor="@color/colorTextTitle"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
tools:fontFamily="sans-serif-medium" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:fontFamily="@font/rubik_regular"
|
||||
android:text="Inject encryption key from KeyPOS"
|
||||
android:textColor="@color/colorTextContent"
|
||||
android:textSize="14sp"
|
||||
tools:fontFamily="sans-serif" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_right_arrow"
|
||||
app:tint="@color/colorPrimary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</layout>
|
||||
@ -69,7 +69,8 @@
|
||||
android:layout_weight="1"
|
||||
android:text="Partial Amount"
|
||||
android:textSize="16sp"
|
||||
android:visibility="@{sharedViewModel.qrPartialRefundEnable ? View.VISIBLE : View.GONE}"
|
||||
android:visibility="@{kPayViewModel.partialRefundEnabled ? View.VISIBLE : View.GONE}"
|
||||
|
||||
/>
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
@ -234,7 +234,156 @@
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
<!-- Host Config -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/hostConfigCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:clickable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:onClick="@{()->click.onHostConfigClick()}"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="20dp">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:cardBackgroundColor="@color/colorPrimary"
|
||||
app:cardCornerRadius="24dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_device_info"
|
||||
app:tint="@color/white" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:text="Hosts Config"
|
||||
android:textColor="@color/colorTextTitle"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
tools:fontFamily="sans-serif-medium" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/hostConfigSummary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:fontFamily="@font/rubik_regular"
|
||||
android:text="Detail for binded hosts configs"
|
||||
android:textColor="@color/colorTextContent"
|
||||
android:textSize="14sp"
|
||||
tools:fontFamily="sans-serif" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_right_arrow"
|
||||
app:tint="@color/colorPrimary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/injectKeyCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:clickable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:onClick="@{()->click.onInjectKeyClick()}"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="20dp">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:cardBackgroundColor="@color/colorPrimary"
|
||||
app:cardCornerRadius="24dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_key_index"
|
||||
app:tint="@color/white" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:text="Inject Key"
|
||||
android:textColor="@color/colorTextTitle"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
tools:fontFamily="sans-serif-medium" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/injectKeyText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:fontFamily="@font/rubik_regular"
|
||||
android:text="Click to inject"
|
||||
android:textColor="@color/colorTextContent"
|
||||
android:textSize="14sp"
|
||||
tools:fontFamily="sans-serif" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_right_arrow"
|
||||
app:tint="@color/colorPrimary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
<!-- <!– Demo Mode Card –>-->
|
||||
@ -745,6 +894,7 @@
|
||||
tools:fontFamily="sans-serif-medium" />
|
||||
|
||||
<!-- TMS Server URL Card -->
|
||||
<!-- android:onClick="@{()->click.onTmsAddressClick()}"-->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/tmsAddressCard"
|
||||
android:layout_width="match_parent"
|
||||
@ -752,7 +902,6 @@
|
||||
android:layout_marginBottom="12dp"
|
||||
android:clickable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:onClick="@{()->click.onTmsAddressClick()}"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp">
|
||||
|
||||
38
app/src/main/res/layout/item_host_config.xml
Normal file
38
app/src/main/res/layout/item_host_config.xml
Normal file
@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<data>
|
||||
<variable name="item" type="com.utsmm.kbz.ui.settings.HostConfigItem"/>
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:text="@{item.name}"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<TextView
|
||||
android:text='@{"IP: " + item.ip}'
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:text='@{"MID: " + item.mid}'
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<TextView
|
||||
android:text='@{"TID: " + item.tid}'
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -377,81 +377,6 @@
|
||||
android:textStyle="bold"
|
||||
tools:fontFamily="sans-serif-medium" />
|
||||
|
||||
<!-- Print Config Card -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/print_config"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:clickable="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:onClick="@{()->click.onClickPrintConfig()}"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="2dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="20dp">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
app:cardBackgroundColor="@color/colorPrimary"
|
||||
app:cardCornerRadius="24dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_config"
|
||||
app:tint="@color/white" />
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/rubik_medium"
|
||||
android:text="Print Config"
|
||||
android:textColor="@color/colorTextTitle"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
tools:fontFamily="sans-serif-medium" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="2dp"
|
||||
android:fontFamily="@font/rubik_regular"
|
||||
android:text="Print device configs"
|
||||
android:textColor="@color/colorTextContent"
|
||||
android:textSize="14sp"
|
||||
tools:fontFamily="sans-serif" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_right_arrow"
|
||||
app:tint="@color/colorPrimary" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- Function Card -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/tv_function"
|
||||
|
||||
@ -62,8 +62,20 @@
|
||||
<action
|
||||
android:id="@+id/action_nav_settings_to_deleteKeyFragment"
|
||||
app:destination="@id/deleteKeyFragment" />
|
||||
<action
|
||||
android:id="@+id/action_nav_settings_to_hostConfigFragment"
|
||||
app:destination="@id/hostConfigFragment"/>
|
||||
<action
|
||||
android:id="@+id/action_nav_settings_to_injectKeyFragment"
|
||||
app:destination="@id/injectKeyFragment" />
|
||||
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/hostConfigFragment"
|
||||
android:name="com.utsmm.kbz.ui.settings.HostConfigFragment"
|
||||
/>
|
||||
|
||||
<fragment
|
||||
tools:layout="@layout/fragment_trans_result_screen"
|
||||
android:id="@+id/transactionResultFragment"
|
||||
@ -160,6 +172,9 @@
|
||||
<action
|
||||
android:id="@+id/action_nav_main_to_nav_sign_on"
|
||||
app:destination="@id/nav_sign_on" />
|
||||
<action
|
||||
android:id="@+id/action_nav_main_to_manageFunctionFragment"
|
||||
app:destination="@id/managementFunctionFragment" />
|
||||
|
||||
</fragment>
|
||||
<fragment
|
||||
@ -285,6 +300,12 @@
|
||||
android:name="com.utsmm.kbz.ui.settings.ConfigSettingsFragment"
|
||||
android:label="ConfigSettingsFragment" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/injectKeyFragment"
|
||||
android:name="com.utsmm.kbz.ui.settings.InjectKeyFragment"
|
||||
android:label="InjectKeyFragment"
|
||||
tools:layout="@layout/fragment_inject_key" />
|
||||
|
||||
<fragment
|
||||
tools:layout="@layout/fragment_password_screen"
|
||||
android:id="@+id/inputPasswordFragment"
|
||||
|
||||
@ -518,6 +518,8 @@
|
||||
<string name="error_occurred">Error Occured</string>
|
||||
<string name="nav_app_bar_open_drawer_description">Open navigation drawer</string>
|
||||
<string name="no_history">No History yet</string>
|
||||
<string name="qr_pay">QR Pay</string>
|
||||
<string name="dash_see_more">See More</string>
|
||||
<string-array name="pref_bank_name">
|
||||
<item>UTS</item>
|
||||
<item>YOMA Bank</item>
|
||||
@ -596,5 +598,7 @@
|
||||
<item>PhaYaSa</item>
|
||||
<item>YaTaNa</item>
|
||||
</string-array>
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||
|
||||
</resources>
|
||||
@ -86,6 +86,7 @@ dependencies {
|
||||
implementation project(path: ':paysdk-lib')
|
||||
implementation project(path: ':nexsdk-lib')
|
||||
implementation project(path: ':xpay')
|
||||
implementation project(path: ':nexdlkey-lib')
|
||||
|
||||
// implementation 'com.sunmi:printerlibrary:1.0.9'
|
||||
implementation 'com.sunmi:printerlibrary:1.0.23'
|
||||
|
||||
@ -285,9 +285,8 @@ public class NetworkModule {
|
||||
tmsAddress = getTMSUrlFromNative();
|
||||
}
|
||||
|
||||
String baseUrl = tmsAddress.trim() + "/api/v1/";
|
||||
// String baseUrl = tmsAddress.trim() + "/";
|
||||
|
||||
// String baseUrl = tmsAddress.trim() + "/api/v1/";
|
||||
String baseUrl = tmsAddress.trim() + "/";
|
||||
|
||||
final Gson gson =
|
||||
new GsonBuilder().create();
|
||||
@ -398,8 +397,8 @@ public class NetworkModule {
|
||||
OkHttpClient client = new OkHttpClient.Builder()
|
||||
.addInterceptor(interceptor)
|
||||
.build();
|
||||
String baseUrl = "http://receipt-nest.utsmyanmar.com/";
|
||||
// String baseUrl = "https://api-tms-uat.kbzbank.com:8443/receipt/";
|
||||
// String baseUrl = "http://receipt-nest.utsmyanmar.com/";
|
||||
String baseUrl = "https://api-tms-uat.kbzbank.com:8443/receipt/";
|
||||
|
||||
return new Retrofit.Builder()
|
||||
.baseUrl(baseUrl)
|
||||
|
||||
@ -21,6 +21,10 @@ public class EReceiptRequest {
|
||||
private String DE63_02;
|
||||
private String DE63_03;
|
||||
private String DE63_04;
|
||||
private String DE63_05;
|
||||
private String DE63_06;
|
||||
private String DE63_07;
|
||||
private String DE63_08;
|
||||
private String serial;
|
||||
|
||||
private String appId;
|
||||
@ -120,6 +124,32 @@ public class EReceiptRequest {
|
||||
return batchNumber;
|
||||
}
|
||||
|
||||
public String getDE63_05() {
|
||||
return DE63_05;
|
||||
}
|
||||
public String getDE63_06() {
|
||||
return DE63_06;
|
||||
}
|
||||
public String getDE63_07() {
|
||||
return DE63_07;
|
||||
}
|
||||
public String getDE63_08() {
|
||||
return DE63_08;
|
||||
}
|
||||
public void setDE63_05(String DE63_05) {
|
||||
this.DE63_05 = DE63_05;
|
||||
}
|
||||
public void setDE63_06(String DE63_06) {
|
||||
this.DE63_06 = DE63_06;
|
||||
}
|
||||
public void setDE63_07(String DE63_07) {
|
||||
this.DE63_07 = DE63_07;
|
||||
}
|
||||
|
||||
public void setDE63_08(String DE63_08) {
|
||||
this.DE63_08 = DE63_08;
|
||||
}
|
||||
|
||||
public void setBatchNumber(String batchNumber) {
|
||||
this.batchNumber = batchNumber;
|
||||
}
|
||||
|
||||
2
nexdlkey-lib/build.gradle
Normal file
2
nexdlkey-lib/build.gradle
Normal file
@ -0,0 +1,2 @@
|
||||
configurations.maybeCreate("default")
|
||||
artifacts.add("default", file('nexgo-sdk-dlkey-1.0.2.aar'))
|
||||
@ -0,0 +1 @@
|
||||
i/jars/classes.jar
|
||||
@ -0,0 +1 @@
|
||||
o/nexgo-sdk-dlkey-1.0.2-runtime
|
||||
Binary file not shown.
@ -0,0 +1 @@
|
||||
o/nexgo-sdk-dlkey-1.0.2
|
||||
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.nexgo.downloadkey"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="21"
|
||||
android:targetSdkVersion="26" />
|
||||
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:label="@string/app_name"
|
||||
android:supportsRtl="true" >
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">downloadkey</string>
|
||||
</resources>
|
||||
@ -0,0 +1 @@
|
||||
i/AndroidManifest.xml
|
||||
@ -0,0 +1 @@
|
||||
i/
|
||||
@ -0,0 +1 @@
|
||||
o/nexgo-sdk-dlkey-1.0.2-api.jar
|
||||
Binary file not shown.
@ -0,0 +1 @@
|
||||
o/com.nexgo.downloadkey-r.txt
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1 @@
|
||||
o/com.nexgo.downloadkey
|
||||
@ -0,0 +1 @@
|
||||
i/jni
|
||||
@ -0,0 +1 @@
|
||||
o/nexgo-sdk-dlkey-1.0.2-runtime.jar
|
||||
Binary file not shown.
@ -0,0 +1 @@
|
||||
i/
|
||||
@ -0,0 +1 @@
|
||||
i/res
|
||||
BIN
nexdlkey-lib/nexgo-sdk-dlkey-1.0.2.aar
Normal file
BIN
nexdlkey-lib/nexgo-sdk-dlkey-1.0.2.aar
Normal file
Binary file not shown.
@ -63,6 +63,7 @@ dependencies {
|
||||
// implementation project(path:':PayLib-release-1.4.58')
|
||||
implementation project(path: ':nexsdk-lib')
|
||||
implementation project(path: ':paysdk-lib')
|
||||
implementation project(path: ':nexdlkey-lib')
|
||||
// implementation project(path: ':sunmiui-lib')
|
||||
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
|
||||
@ -9,6 +9,7 @@ import android.os.Build;
|
||||
import android.os.RemoteException;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.nexgo.oaf.apiv3.SdkResult;
|
||||
import com.nexgo.oaf.apiv3.device.printer.AlignEnum;
|
||||
import com.nexgo.oaf.apiv3.device.printer.DotMatrixFontEnum;
|
||||
import com.nexgo.oaf.apiv3.device.printer.FontEntity;
|
||||
@ -847,6 +848,11 @@ public abstract class BaseXPrint {
|
||||
}
|
||||
|
||||
protected void startPrintNex() {
|
||||
|
||||
if(printer.getStatus() != SdkResult.Success) {
|
||||
callbackStatus.onFailure();
|
||||
}
|
||||
|
||||
printer.startPrint(true, new OnPrintListener() {
|
||||
@Override
|
||||
public void onPrintResult(final int retCode) {
|
||||
|
||||
@ -123,7 +123,7 @@ public class SignOnProcess {
|
||||
|
||||
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(tmkIndex, 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);
|
||||
// resultCode = res;
|
||||
if (res < 0) {
|
||||
@ -170,7 +170,7 @@ public class SignOnProcess {
|
||||
}
|
||||
|
||||
LogUtil.d(TAG, "TMK Index:" + tmkIndex);
|
||||
int res = PayLibNex.getInstance().deviceEngine.getPinPad().writeWKey(9, WorkKeyTypeEnum.PINKEY,encryptedPIK,encryptedPIK.length);
|
||||
int res = PayLibNex.getInstance().deviceEngine.getPinPad().writeWKey(tmkIndex, 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);
|
||||
resultCode = res;
|
||||
if (res < 0) {
|
||||
|
||||
@ -42,8 +42,8 @@ public class SystemParamsSettings implements Serializable {
|
||||
|
||||
// private String tmsAddress = "https://tms.smile-mm.com";
|
||||
// private String tmsAddress = "http://128.199.170.203";
|
||||
private String tmsAddress = "http://sirius-nest.utsmyanmar.com";
|
||||
// private String tmsAddress = "https://api-tms-uat.kbzbank.com:8443/sirius";
|
||||
// private String tmsAddress = "http://sirius-nest.utsmyanmar.com";
|
||||
private String tmsAddress = "https://api-tms-uat.kbzbank.com:8443/sirius";
|
||||
private String ereceiptAddress = "http://receipt-nest.utsmyanmar.com";
|
||||
|
||||
private String terminalCapability = "E0E8C8";
|
||||
|
||||
@ -33,3 +33,4 @@ include ':xpay'
|
||||
include ':ecr'
|
||||
include ':ecr-service-lib'
|
||||
include ':qrgen-lib'
|
||||
include ':nexdlkey-lib'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user