Compare commits
No commits in common. "97014377a82bd1fb9a96c512c83082ad381eac97" and "b92f9bfe4e90070a2c96f1dbc110b1108f793185" have entirely different histories.
97014377a8
...
b92f9bfe4e
@ -16,56 +16,20 @@ android {
|
|||||||
targetSdk 33
|
targetSdk 33
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "1.0"
|
||||||
|
|
||||||
|
// applicationId "com.utsmm.kbz"
|
||||||
|
// versionName "1.10"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
|
// // Add CMake configuration
|
||||||
|
// externalNativeBuild {
|
||||||
|
// cmake {
|
||||||
|
// cppFlags "-std=c++14"
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------
|
|
||||||
// 🔥 MULTI-VARIANT FLAVORS
|
|
||||||
// -----------------------------
|
|
||||||
flavorDimensions "env"
|
|
||||||
|
|
||||||
productFlavors {
|
|
||||||
sit {
|
|
||||||
dimension "env"
|
|
||||||
applicationId "com.utsmm.kbz.sit"
|
|
||||||
versionNameSuffix "-sit"
|
|
||||||
resValue "string", "app_name", "KBZ-SIT"
|
|
||||||
}
|
|
||||||
|
|
||||||
uat {
|
|
||||||
dimension "env"
|
|
||||||
applicationId "com.utsmm.kbz.uat"
|
|
||||||
versionNameSuffix "-uat"
|
|
||||||
resValue "string", "app_name", "KBZ-UAT"
|
|
||||||
}
|
|
||||||
|
|
||||||
prod {
|
|
||||||
dimension "env"
|
|
||||||
applicationId "com.utsmm.kbz"
|
|
||||||
versionNameSuffix ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// defaultConfig {
|
|
||||||
// applicationId "com.utsmm.kbz.sit"
|
|
||||||
// minSdk 24
|
|
||||||
// targetSdk 33
|
|
||||||
// versionCode 1
|
|
||||||
// versionName "1.0"
|
|
||||||
//
|
|
||||||
//// applicationId "com.utsmm.kbz"
|
|
||||||
//// versionName "1.10"
|
|
||||||
//
|
|
||||||
// testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
||||||
//
|
|
||||||
//// // Add CMake configuration
|
|
||||||
//// externalNativeBuild {
|
|
||||||
//// cmake {
|
|
||||||
//// cppFlags "-std=c++14"
|
|
||||||
//// }
|
|
||||||
//// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Configure CMake
|
// Configure CMake
|
||||||
// externalNativeBuild {
|
// externalNativeBuild {
|
||||||
// cmake {
|
// cmake {
|
||||||
@ -79,9 +43,6 @@ android {
|
|||||||
minifyEnabled false
|
minifyEnabled false
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
debug {
|
|
||||||
debuggable true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_11
|
sourceCompatibility JavaVersion.VERSION_11
|
||||||
|
|||||||
@ -58,8 +58,6 @@ public class MainViewModel extends ViewModel {
|
|||||||
|
|
||||||
public MutableLiveData<Boolean> kPayStatus = new MutableLiveData<>();
|
public MutableLiveData<Boolean> kPayStatus = new MutableLiveData<>();
|
||||||
|
|
||||||
public MutableLiveData<Boolean> voidStatus = new MutableLiveData<>();
|
|
||||||
|
|
||||||
|
|
||||||
public SingleLiveEvent<String> disabledMsg = new SingleLiveEvent<>();
|
public SingleLiveEvent<String> disabledMsg = new SingleLiveEvent<>();
|
||||||
|
|
||||||
@ -100,8 +98,6 @@ public class MainViewModel extends ViewModel {
|
|||||||
kPayStatus.setValue(SystemParamsOperation.getInstance().getQRPayStatus());
|
kPayStatus.setValue(SystemParamsOperation.getInstance().getQRPayStatus());
|
||||||
|
|
||||||
disabledMsg.setValue(SystemParamsOperation.getInstance().getDisabledMsg());
|
disabledMsg.setValue(SystemParamsOperation.getInstance().getDisabledMsg());
|
||||||
|
|
||||||
voidStatus.setValue(SystemParamsOperation.getInstance().getVoidStatus());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -51,12 +51,10 @@ public class QRPayAdapter extends RecyclerView.Adapter<QRPayAdapter.ViewHolder>
|
|||||||
@Override
|
@Override
|
||||||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||||
QRPayItem item = items.get(position);
|
QRPayItem item = items.get(position);
|
||||||
|
holder.binding.setText(item.title);
|
||||||
holder.binding.setItem(item);
|
holder.binding.setIcon(item.icon);
|
||||||
holder.binding.executePendingBindings();
|
|
||||||
|
|
||||||
holder.binding.btnItem.setOnClickListener(v -> {
|
holder.binding.btnItem.setOnClickListener(v -> {
|
||||||
if(item.isActive && listener != null){
|
if(listener != null){
|
||||||
listener.onItemClick(position);
|
listener.onItemClick(position);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -100,18 +100,10 @@ public class InputAmountFragment extends DataBindingFragment implements DataBind
|
|||||||
setToolBarTitleWithBackIcon(getResourceString(R.string.txt_subtitle_amount));
|
setToolBarTitleWithBackIcon(getResourceString(R.string.txt_subtitle_amount));
|
||||||
|
|
||||||
boolean decimalEnabled = SystemParamsOperation.getInstance().getDecimalEnable();
|
boolean decimalEnabled = SystemParamsOperation.getInstance().getDecimalEnable();
|
||||||
boolean qrDecimalEnabled = SystemParamsOperation.getInstance().isQrDecimalEnable();
|
|
||||||
boolean isDecimalEnabled;
|
|
||||||
|
|
||||||
if(sharedViewModel.transactionsType.getValue() == TransactionsType.MMQR){
|
|
||||||
isDecimalEnabled = qrDecimalEnabled;
|
|
||||||
}else {
|
|
||||||
isDecimalEnabled = decimalEnabled;
|
|
||||||
}
|
|
||||||
View keyboardView = getView().findViewById(R.id.numberKeyboard);
|
View keyboardView = getView().findViewById(R.id.numberKeyboard);
|
||||||
|
|
||||||
if (keyboardView instanceof NumberKeyboard) {
|
if (keyboardView instanceof NumberKeyboard) {
|
||||||
((NumberKeyboard) keyboardView).setDecimalEnable(isDecimalEnabled);
|
((NumberKeyboard) keyboardView).setDecimalEnable(decimalEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(sharedViewModel.isEcr.getValue() != null){
|
if(sharedViewModel.isEcr.getValue() != null){
|
||||||
|
|||||||
@ -405,7 +405,7 @@ public class SharedViewModel extends ViewModel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startPrintProcessSettlement() {
|
private void startPrintProcessSettlement() {
|
||||||
|
|
||||||
if(payDetail.getValue() == null) return;
|
if(payDetail.getValue() == null) return;
|
||||||
|
|
||||||
|
|||||||
@ -106,9 +106,6 @@ public class DashboardTransFragment extends DataBindingFragment {
|
|||||||
case HISTORY:
|
case HISTORY:
|
||||||
new DashboardTransFragment.ClickEvent().onClickHistory();
|
new DashboardTransFragment.ClickEvent().onClickHistory();
|
||||||
break;
|
break;
|
||||||
case DEVICE_CONFIG:
|
|
||||||
new DashboardTransFragment.ClickEvent().onClickDeviceConfig();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -213,10 +210,7 @@ public class DashboardTransFragment extends DataBindingFragment {
|
|||||||
safeRouteTo(currentId,routeId,hostId);
|
safeRouteTo(currentId,routeId,hostId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClickDeviceConfig(){
|
|
||||||
routeId = R.id.action_dashboardTransFragment_to_deviceConfig;
|
|
||||||
safeRouteTo(currentId, routeId, hostId);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,14 +17,12 @@ import com.utsmm.kbz.util.tms.TMSUtil;
|
|||||||
import com.utsmyanmar.baselib.util.DataBindingConfig;
|
import com.utsmyanmar.baselib.util.DataBindingConfig;
|
||||||
import com.utsmyanmar.baselib.fragment.DataBindingFragment;
|
import com.utsmyanmar.baselib.fragment.DataBindingFragment;
|
||||||
import com.utsmyanmar.paylibs.model.PayDetail;
|
import com.utsmyanmar.paylibs.model.PayDetail;
|
||||||
import com.utsmyanmar.paylibs.utils.LogUtil;
|
|
||||||
import com.utsmyanmar.paylibs.utils.POSUtil;
|
import com.utsmyanmar.paylibs.utils.POSUtil;
|
||||||
import com.utsmyanmar.paylibs.utils.core_utils.SystemParamsOperation;
|
import com.utsmyanmar.paylibs.utils.core_utils.SystemParamsOperation;
|
||||||
import com.utsmyanmar.paylibs.utils.enums.CurrencyType;
|
import com.utsmyanmar.paylibs.utils.enums.CurrencyType;
|
||||||
import com.utsmyanmar.paylibs.utils.enums.HostType;
|
import com.utsmyanmar.paylibs.utils.enums.HostType;
|
||||||
import com.utsmyanmar.paylibs.utils.iso_utils.TransactionsType;
|
import com.utsmyanmar.paylibs.utils.iso_utils.TransactionsType;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -35,6 +33,9 @@ public class QRPayFragment extends DataBindingFragment {
|
|||||||
private static final int hostId = Constants.NAV_HOST_ID;
|
private static final int hostId = Constants.NAV_HOST_ID;
|
||||||
private int routeId;
|
private int routeId;
|
||||||
private static final int currentId = R.id.qrFragment;
|
private static final int currentId = R.id.qrFragment;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private Observer<PayDetail> observeLastTrans;
|
private Observer<PayDetail> observeLastTrans;
|
||||||
private PayDetail lastPay;
|
private PayDetail lastPay;
|
||||||
|
|
||||||
@ -53,20 +54,12 @@ public class QRPayFragment extends DataBindingFragment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected DataBindingConfig getDataBindingConfig() {
|
protected DataBindingConfig getDataBindingConfig() {
|
||||||
boolean isQrRefundEnable = SystemParamsOperation.getInstance().getQrRefundEnable();
|
|
||||||
LogUtil.d("KMK", "isQrRefundEnable =>" + isQrRefundEnable);
|
|
||||||
List<QRPayItem> features = new ArrayList<>();
|
|
||||||
features.add(new QRPayItem("Sale", R.drawable.ic_qr_pay, true));
|
|
||||||
if(isQrRefundEnable){
|
|
||||||
features.add(new QRPayItem("Refund", R.drawable.ic_refund, false));
|
|
||||||
}
|
|
||||||
features.add(new QRPayItem("History", R.drawable.ic_history, true));
|
|
||||||
|
|
||||||
// List<QRPayItem> features = List.of(
|
List<QRPayItem> features = List.of(
|
||||||
// new QRPayItem("Sale", R.drawable.ic_qr_pay, true),
|
new QRPayItem("Sale", R.drawable.ic_qr_pay),
|
||||||
// new QRPayItem("Refund", R.drawable.ic_refund, false),
|
new QRPayItem("Refund", R.drawable.ic_refund),
|
||||||
// new QRPayItem("History", R.drawable.ic_history, true)
|
new QRPayItem("History", R.drawable.ic_history)
|
||||||
// );
|
);
|
||||||
|
|
||||||
QRPayAdapter adapter = new QRPayAdapter(features, position -> {
|
QRPayAdapter adapter = new QRPayAdapter(features, position -> {
|
||||||
QRPayItem selectedBtn = features.get(position);
|
QRPayItem selectedBtn = features.get(position);
|
||||||
|
|||||||
@ -3,12 +3,9 @@ package com.utsmm.kbz.ui.qr_pay;
|
|||||||
public class QRPayItem {
|
public class QRPayItem {
|
||||||
public String title;
|
public String title;
|
||||||
public int icon;
|
public int icon;
|
||||||
public boolean isActive;
|
|
||||||
|
|
||||||
public QRPayItem(String title, int icon, boolean isActive) {
|
public QRPayItem(String title, int icon) {
|
||||||
this.title = title;
|
this.title = title;
|
||||||
this.icon = icon;
|
this.icon = icon;
|
||||||
this.isActive = isActive;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,7 +11,6 @@ import android.os.Bundle;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.core.content.res.ResourcesCompat;
|
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.lifecycle.ViewModelProvider;
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
@ -50,8 +49,8 @@ public class HostConfigFragment extends DataBindingFragment {
|
|||||||
|
|
||||||
private HostConfigViewModel viewModel;
|
private HostConfigViewModel viewModel;
|
||||||
protected Printer printer;
|
protected Printer printer;
|
||||||
int FONT_NORMAL = 24;
|
int FONT_NORMAL = 20;
|
||||||
int FONT_HEADER = 30;
|
int FONT_HEADER = 28;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initViewModel() {
|
protected void initViewModel() {
|
||||||
@ -113,56 +112,58 @@ public class HostConfigFragment extends DataBindingFragment {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
printer.setGray(GrayLevelEnum.LEVEL_2);
|
printer.setGray(GrayLevelEnum.LEVEL_2);
|
||||||
Typeface typeface = ResourcesCompat.getFont(requireContext(), R.font.consolas_regular);
|
printer.setTypeface(Typeface.SANS_SERIF);
|
||||||
printer.setTypeface(typeface);
|
|
||||||
SystemParamsOperation sp = SystemParamsOperation.getInstance();
|
SystemParamsOperation sp = SystemParamsOperation.getInstance();
|
||||||
|
|
||||||
Bitmap bitmap = BitmapFactory.decodeResource(requireContext().getResources(), R.drawable.kbz_receipt_logo);
|
|
||||||
|
Bitmap bitmap = BitmapFactory.decodeResource(requireContext().getResources(), com.utsmyanmar.paylibs.R.drawable.print_kbz_logo);
|
||||||
printLogo(bitmap);
|
printLogo(bitmap);
|
||||||
|
printer.appendPrnStr("\n", FONT_NORMAL, AlignEnum.CENTER, false);
|
||||||
printer.appendPrnStr("TERMINAL CONFIGURATION", FONT_HEADER, AlignEnum.CENTER, true);
|
printer.appendPrnStr("TERMINAL CONFIGURATION", FONT_HEADER, AlignEnum.CENTER, true);
|
||||||
printer.appendPrnStr("\n", FONT_NORMAL, AlignEnum.CENTER, false);
|
printer.appendPrnStr("\n", FONT_NORMAL, AlignEnum.CENTER, false);
|
||||||
printer.appendPrnStr(sp.getMerchantName(), 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.getMerchantAddress(), FONT_NORMAL, AlignEnum.CENTER, false);
|
||||||
printer.appendPrnStr(sp.getMerchantAddress2(), 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("\n--------------------------------\n", FONT_NORMAL, AlignEnum.LEFT, false);
|
||||||
printer.appendPrnStr("PRIMARY HOST", FONT_NORMAL, AlignEnum.LEFT, true);
|
printer.appendPrnStr("PRIMARY HOST", FONT_NORMAL, AlignEnum.LEFT, true);
|
||||||
printer.appendPrnStr("Name : " + sp.getHostName(), FONT_NORMAL, AlignEnum.LEFT, false);
|
printer.appendPrnStr("Name : " + sp.getHostName(), FONT_NORMAL, AlignEnum.LEFT, false);
|
||||||
printer.appendPrnStr("TID : " + sp.getTerminalId(), 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);
|
printer.appendPrnStr("MID : " + sp.getMerchantId(), FONT_NORMAL, AlignEnum.LEFT, false);
|
||||||
String ipAddress = sp.getIpAddress();
|
String ipAddress = sp.getIpAddress();
|
||||||
String[] ipAndPort = splitIpAndPort(ipAddress);
|
String[] ipAndPort = splitIpAndPort(ipAddress);
|
||||||
String ip = ipAndPort[0];
|
String ip = ipAndPort[0];
|
||||||
String port = ipAndPort[1];
|
String port = ipAndPort[1];
|
||||||
printer.appendPrnStr("Primary Ip : " + ip, FONT_NORMAL, AlignEnum.LEFT, true);
|
printer.appendPrnStr("Primary Ip : " + ip, FONT_NORMAL, AlignEnum.LEFT, true);
|
||||||
printer.appendPrnStr("Primary Port : " + port, FONT_NORMAL, AlignEnum.LEFT, true);
|
printer.appendPrnStr("Primary Port : " + port, FONT_NORMAL, AlignEnum.LEFT, true);
|
||||||
String secIpAddress = sp.getSecIpAddress();
|
String secIpAddress = sp.getSecIpAddress();
|
||||||
String[] secIpAndPort = splitIpAndPort(secIpAddress);
|
String[] secIpAndPort = splitIpAndPort(secIpAddress);
|
||||||
String secIp = secIpAndPort[0];
|
String secIp = secIpAndPort[0];
|
||||||
String secPort = secIpAndPort[1];
|
String secPort = secIpAndPort[1];
|
||||||
printer.appendPrnStr("Secondary Ip : " + secIp, FONT_NORMAL, AlignEnum.LEFT, true);
|
printer.appendPrnStr("Secondary Ip : " + secIp, FONT_NORMAL, AlignEnum.LEFT, true);
|
||||||
printer.appendPrnStr("Secondary Port: " + secPort, 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("Currency Code : " + sp.getCurrencyType(), FONT_NORMAL, AlignEnum.LEFT, true);
|
||||||
printer.appendPrnStr("\n---------------------------\n", FONT_NORMAL, AlignEnum.LEFT, false);
|
printer.appendPrnStr("\n--------------------------------\n", FONT_NORMAL, AlignEnum.LEFT, false);
|
||||||
|
|
||||||
if (!TextUtils.isEmpty(sp.getSecHostName())) {
|
if (!TextUtils.isEmpty(sp.getSecHostName())) {
|
||||||
printer.appendPrnStr("SECONDARY HOST", FONT_NORMAL, AlignEnum.LEFT, true);
|
printer.appendPrnStr("SECONDARY HOST", FONT_NORMAL, AlignEnum.LEFT, true);
|
||||||
printer.appendPrnStr("Name : " + sp.getSecHostName(), FONT_NORMAL, AlignEnum.LEFT, false);
|
printer.appendPrnStr("Name : " + sp.getSecHostName(), FONT_NORMAL, AlignEnum.LEFT, false);
|
||||||
printer.appendPrnStr("TID : " + sp.getSecHostTerminalId(), 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);
|
printer.appendPrnStr("MID : " + sp.getSecHostMerchantId(), FONT_NORMAL, AlignEnum.LEFT, false);
|
||||||
String secHostIpAddress = sp.getSecHostIpAddress();
|
String secHostIpAddress = sp.getSecHostIpAddress();
|
||||||
String[] secHostIpAndPort = splitIpAndPort(secHostIpAddress);
|
String[] secHostIpAndPort = splitIpAndPort(secHostIpAddress);
|
||||||
String secHostIp = secHostIpAndPort[0];
|
String secHostIp = secHostIpAndPort[0];
|
||||||
String secHostPort = secHostIpAndPort[1];
|
String secHostPort = secHostIpAndPort[1];
|
||||||
printer.appendPrnStr("Primary Ip : " + secHostIp, FONT_NORMAL, AlignEnum.LEFT, true);
|
printer.appendPrnStr("Primary Ip : " + secHostIp, FONT_NORMAL, AlignEnum.LEFT, true);
|
||||||
printer.appendPrnStr("Primary Port : " + secHostPort, FONT_NORMAL, AlignEnum.LEFT, true);
|
printer.appendPrnStr("Primary Port : " + secHostPort, FONT_NORMAL, AlignEnum.LEFT, true);
|
||||||
String secHostSecIpAddress = sp.getSecHostSecIpAddress();
|
String secHostSecIpAddress = sp.getSecHostSecIpAddress();
|
||||||
String[] SecHostSecIpAndPort = splitIpAndPort(secHostSecIpAddress);
|
String[] SecHostSecIpAndPort = splitIpAndPort(secHostSecIpAddress);
|
||||||
String secHostSecIp = SecHostSecIpAndPort[0];
|
String secHostSecIp = SecHostSecIpAndPort[0];
|
||||||
String secHostSecPort = SecHostSecIpAndPort[1];
|
String secHostSecPort = SecHostSecIpAndPort[1];
|
||||||
printer.appendPrnStr("Secondary Ip : " + secHostSecIp, FONT_NORMAL, AlignEnum.LEFT, true);
|
printer.appendPrnStr("Secondary Ip : " + secHostSecIp, FONT_NORMAL, AlignEnum.LEFT, true);
|
||||||
printer.appendPrnStr("Secondary Port: " + secHostSecPort, 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("Currency Code : " + sp.getCurrencyType(), FONT_NORMAL, AlignEnum.LEFT, true);
|
||||||
printer.appendPrnStr("\n---------------------------\n", FONT_NORMAL, AlignEnum.LEFT, false);
|
printer.appendPrnStr("\n--------------------------------\n", FONT_NORMAL, AlignEnum.LEFT, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
printer.startPrint(true, ret -> {
|
printer.startPrint(true, ret -> {
|
||||||
|
|||||||
@ -21,6 +21,5 @@ public enum FeaturesType {
|
|||||||
TEST,
|
TEST,
|
||||||
QR_INQUIRY,
|
QR_INQUIRY,
|
||||||
QR_REFUND,
|
QR_REFUND,
|
||||||
LOG_OUT,
|
LOG_OUT
|
||||||
DEVICE_CONFIG
|
|
||||||
}
|
}
|
||||||
@ -602,11 +602,8 @@ public class TMSSetupsImpl implements TMSSetups{
|
|||||||
SystemParamsOperation.getInstance().setAppKey(data);
|
SystemParamsOperation.getInstance().setAppKey(data);
|
||||||
} else if (TextUtils.equals(name,"app_id")) {
|
} else if (TextUtils.equals(name,"app_id")) {
|
||||||
SystemParamsOperation.getInstance().setAppId(data);
|
SystemParamsOperation.getInstance().setAppId(data);
|
||||||
}else if (TextUtils.equals(name, "qr_decimal_enable")) {
|
|
||||||
SystemParamsOperation.getInstance().setQrDecimalEnable(parseBoolean(data));
|
|
||||||
}else if (TextUtils.equals(name, "qr_refund_enable")){
|
|
||||||
SystemParamsOperation.getInstance().setQrRefundEnable(parseBoolean(data));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemParamsOperation.getInstance().setCarouselUrls(convertToString(imgUrls));
|
SystemParamsOperation.getInstance().setCarouselUrls(convertToString(imgUrls));
|
||||||
|
|||||||
@ -177,6 +177,7 @@ public class TMSUtil {
|
|||||||
LogUtil.d(TAG,"Receipt Footer: "+SystemParamsOperation.getInstance().getReceiptFooter());
|
LogUtil.d(TAG,"Receipt Footer: "+SystemParamsOperation.getInstance().getReceiptFooter());
|
||||||
LogUtil.d(TAG,"Manual Update: "+SystemParamsOperation.getInstance().getManualUpdate());
|
LogUtil.d(TAG,"Manual Update: "+SystemParamsOperation.getInstance().getManualUpdate());
|
||||||
LogUtil.d(TAG,"Master Enabled: "+SystemParamsOperation.getInstance().isEmvEnabled());
|
LogUtil.d(TAG,"Master Enabled: "+SystemParamsOperation.getInstance().isEmvEnabled());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -219,7 +220,7 @@ public class TMSUtil {
|
|||||||
// featuresList.add(new Features(5, fragmentActivity.getString(R.string.menu_wavepay_inquiry), R.drawable.ic_wave_status_dash, FeaturesType.WAVE_PAY_INQUIRY, wavePayInquiryStatus));
|
// featuresList.add(new Features(5, fragmentActivity.getString(R.string.menu_wavepay_inquiry), R.drawable.ic_wave_status_dash, FeaturesType.WAVE_PAY_INQUIRY, wavePayInquiryStatus));
|
||||||
featuresList.add(new Features(1, fragmentActivity.getString(R.string.menu_cash_advance), R.drawable.ic_cash_advance, FeaturesType.CASH_ADVANCE, cashAdvanceStatus));
|
featuresList.add(new Features(1, fragmentActivity.getString(R.string.menu_cash_advance), R.drawable.ic_cash_advance, FeaturesType.CASH_ADVANCE, cashAdvanceStatus));
|
||||||
featuresList.add(new Features(9, fragmentActivity.getString(R.string.menu_history), R.drawable.ic_history, FeaturesType.HISTORY, true));
|
featuresList.add(new Features(9, fragmentActivity.getString(R.string.menu_history), R.drawable.ic_history, FeaturesType.HISTORY, true));
|
||||||
featuresList.add(new Features(10, "Configs", R.drawable.ic_host, FeaturesType.DEVICE_CONFIG, true));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public TMSValidity checkParams() {
|
public TMSValidity checkParams() {
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB |
Binary file not shown.
@ -167,9 +167,6 @@
|
|||||||
android:layout_width="120dp"
|
android:layout_width="120dp"
|
||||||
android:layout_height="120dp"
|
android:layout_height="120dp"
|
||||||
android:background="@drawable/honey"
|
android:background="@drawable/honey"
|
||||||
android:clickable="@{mainViewModel.voidStatus}"
|
|
||||||
android:focusable="@{mainViewModel.voidStatus}"
|
|
||||||
android:alpha="@{mainViewModel.voidStatus ? 1f : 0.5f}"
|
|
||||||
android:onClick="@{() -> click.onClickVoid()}"
|
android:onClick="@{() -> click.onClickVoid()}"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/bt4"
|
app:layout_constraintEnd_toStartOf="@+id/bt4"
|
||||||
|
|||||||
@ -7,8 +7,11 @@
|
|||||||
<import type="com.utsmm.kbz.R"/>
|
<import type="com.utsmm.kbz.R"/>
|
||||||
<import type="com.utsmm.kbz.util.enums.FeaturesType" />
|
<import type="com.utsmm.kbz.util.enums.FeaturesType" />
|
||||||
<variable
|
<variable
|
||||||
name="item"
|
name="text"
|
||||||
type="com.utsmm.kbz.ui.qr_pay.QRPayItem" />
|
type="String" />
|
||||||
|
<variable
|
||||||
|
name="icon"
|
||||||
|
type="Integer" />
|
||||||
</data>
|
</data>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -22,6 +25,8 @@
|
|||||||
app:cardElevation="6dp"
|
app:cardElevation="6dp"
|
||||||
android:layout_margin="6dp"
|
android:layout_margin="6dp"
|
||||||
android:foreground="?android:attr/selectableItemBackground"
|
android:foreground="?android:attr/selectableItemBackground"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
android:background="@color/white"
|
android:background="@color/white"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
@ -43,7 +48,7 @@
|
|||||||
android:layout_width="38dp"
|
android:layout_width="38dp"
|
||||||
android:layout_height="38dp"
|
android:layout_height="38dp"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
app:srcUrl="@{item.icon}"
|
app:srcUrl="@{icon}"
|
||||||
app:tint="@color/colorPrimary"
|
app:tint="@color/colorPrimary"
|
||||||
tools:src="@drawable/ic_sale"
|
tools:src="@drawable/ic_sale"
|
||||||
tools:tint="@color/colorPrimary" />
|
tools:tint="@color/colorPrimary" />
|
||||||
@ -55,7 +60,7 @@
|
|||||||
android:fontFamily="@font/rubik_medium"
|
android:fontFamily="@font/rubik_medium"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
android:text="@{item.title}"
|
android:text="@{text}"
|
||||||
tools:text="button title"
|
tools:text="button title"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textColor="@color/colorPrimary"
|
android:textColor="@color/colorPrimary"
|
||||||
|
|||||||
@ -629,12 +629,6 @@
|
|||||||
app:popUpToInclusive="true"
|
app:popUpToInclusive="true"
|
||||||
android:id="@+id/action_dashboardTransFragment_to_manageFunctionFragment"
|
android:id="@+id/action_dashboardTransFragment_to_manageFunctionFragment"
|
||||||
app:destination="@id/managementFunctionFragment" />
|
app:destination="@id/managementFunctionFragment" />
|
||||||
<action
|
|
||||||
app:launchSingleTop="true"
|
|
||||||
app:popUpTo="@+id/dashboardTransFragment"
|
|
||||||
app:popUpToInclusive="true"
|
|
||||||
android:id="@+id/action_dashboardTransFragment_to_deviceConfig"
|
|
||||||
app:destination="@id/hostConfigFragment" />
|
|
||||||
</fragment>
|
</fragment>
|
||||||
<dialog
|
<dialog
|
||||||
tools:layout="@layout/fragment_dashboard_bottom_sheet_pre_auth"
|
tools:layout="@layout/fragment_dashboard_bottom_sheet_pre_auth"
|
||||||
|
|||||||
@ -285,8 +285,8 @@ public class NetworkModule {
|
|||||||
tmsAddress = getTMSUrlFromNative();
|
tmsAddress = getTMSUrlFromNative();
|
||||||
}
|
}
|
||||||
|
|
||||||
// String baseUrl = tmsAddress.trim() + "/api/v1/";
|
String baseUrl = tmsAddress.trim() + "/api/v1/";
|
||||||
String baseUrl = tmsAddress.trim() + "/";
|
// String baseUrl = tmsAddress.trim() + "/";
|
||||||
|
|
||||||
final Gson gson =
|
final Gson gson =
|
||||||
new GsonBuilder().create();
|
new GsonBuilder().create();
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
configurations.maybeCreate("default")
|
configurations.maybeCreate("default")
|
||||||
artifacts.add("default", file('nexgo-sdk-dlkey-1.0.3.aar'))
|
artifacts.add("default", file('nexgo-sdk-dlkey-1.0.2.aar'))
|
||||||
@ -1 +0,0 @@
|
|||||||
i/AndroidManifest.xml
|
|
||||||
@ -1 +0,0 @@
|
|||||||
o/com.nexgo.downloadkey-r.txt
|
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1 +0,0 @@
|
|||||||
i/jni
|
|
||||||
@ -1 +0,0 @@
|
|||||||
o/nexgo-sdk-dlkey-1.0.3-api.jar
|
|
||||||
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
o/nexgo-sdk-dlkey-1.0.3-runtime.jar
|
|
||||||
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
o/com.nexgo.downloadkey
|
|
||||||
@ -1 +0,0 @@
|
|||||||
o/nexgo-sdk-dlkey-1.0.3
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
<?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.
@ -1,4 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<string name="app_name">downloadkey</string>
|
|
||||||
</resources>
|
|
||||||
@ -1 +0,0 @@
|
|||||||
i/jars/classes.jar
|
|
||||||
@ -1 +0,0 @@
|
|||||||
i/
|
|
||||||
@ -1 +0,0 @@
|
|||||||
i/res
|
|
||||||
@ -1 +0,0 @@
|
|||||||
i/
|
|
||||||
@ -1 +0,0 @@
|
|||||||
o/nexgo-sdk-dlkey-1.0.3-runtime
|
|
||||||
Binary file not shown.
Binary file not shown.
@ -1573,25 +1573,4 @@ public class SystemParamsOperation {
|
|||||||
return params.isQrPartialRefundEnable();
|
return params.isQrPartialRefundEnable();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setQrDecimalEnable(boolean enable){
|
|
||||||
SystemParamsSettings params = getSystemParamsSettings();
|
|
||||||
params.setQrDecimalEnable(enable);
|
|
||||||
saveSystemParamsSettings(params);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isQrDecimalEnable(){
|
|
||||||
SystemParamsSettings params = getSystemParamsSettings();
|
|
||||||
return params.isQrDecimalEnable();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setQrRefundEnable(boolean enable) {
|
|
||||||
SystemParamsSettings params = getSystemParamsSettings();
|
|
||||||
params.setQrRefundEnable(enable);
|
|
||||||
saveSystemParamsSettings(params);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean getQrRefundEnable(){
|
|
||||||
SystemParamsSettings params = getSystemParamsSettings();
|
|
||||||
return params.getQrRefundEnable();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -42,8 +42,8 @@ public class SystemParamsSettings implements Serializable {
|
|||||||
|
|
||||||
// private String tmsAddress = "https://tms.smile-mm.com";
|
// private String tmsAddress = "https://tms.smile-mm.com";
|
||||||
// private String tmsAddress = "http://128.199.170.203";
|
// private String tmsAddress = "http://128.199.170.203";
|
||||||
// private String tmsAddress = "http://sirius-nest.utsmyanmar.com";
|
private String tmsAddress = "http://sirius-nest.utsmyanmar.com";
|
||||||
private String tmsAddress = "https://api-tms-uat.kbzbank.com:8443/sirius";
|
// private String tmsAddress = "https://api-tms-uat.kbzbank.com:8443/sirius";
|
||||||
private String ereceiptAddress = "http://receipt-nest.utsmyanmar.com";
|
private String ereceiptAddress = "http://receipt-nest.utsmyanmar.com";
|
||||||
|
|
||||||
private String terminalCapability = "E0E8C8";
|
private String terminalCapability = "E0E8C8";
|
||||||
@ -238,9 +238,6 @@ public class SystemParamsSettings implements Serializable {
|
|||||||
|
|
||||||
private boolean qrPartialRefundEnable = false;
|
private boolean qrPartialRefundEnable = false;
|
||||||
|
|
||||||
private boolean qrDecimalEnable = false;
|
|
||||||
private boolean qrRefundEnable = false;
|
|
||||||
|
|
||||||
public boolean isQrPartialRefundEnable(){
|
public boolean isQrPartialRefundEnable(){
|
||||||
return qrPartialRefundEnable;
|
return qrPartialRefundEnable;
|
||||||
}
|
}
|
||||||
@ -935,22 +932,6 @@ public class SystemParamsSettings implements Serializable {
|
|||||||
this.emvEnabled = emvEnabled;
|
this.emvEnabled = emvEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isQrDecimalEnable() {
|
|
||||||
return qrDecimalEnable;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setQrDecimalEnable(boolean qrDecimalEnable){
|
|
||||||
this.qrDecimalEnable = qrDecimalEnable;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setQrRefundEnable(boolean qrRefundEnable) {
|
|
||||||
this.qrRefundEnable = qrRefundEnable;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean getQrRefundEnable(){
|
|
||||||
return qrRefundEnable;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* // 流水号起始
|
/* // 流水号起始
|
||||||
private String serialNum = Configs.getInstance().SERIAL_NUM();
|
private String serialNum = Configs.getInstance().SERIAL_NUM();
|
||||||
// 批次号起始
|
// 批次号起始
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user