Compare commits
4 Commits
b92f9bfe4e
...
97014377a8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
97014377a8 | ||
|
|
424678e0ca | ||
|
|
d42ee5d2f7 | ||
|
|
3fe711cc2f |
@ -16,20 +16,56 @@ 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 {
|
||||||
@ -43,6 +79,9 @@ 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,6 +58,8 @@ 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<>();
|
||||||
|
|
||||||
@ -98,6 +100,8 @@ 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,10 +51,12 @@ 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.setIcon(item.icon);
|
holder.binding.setItem(item);
|
||||||
|
holder.binding.executePendingBindings();
|
||||||
|
|
||||||
holder.binding.btnItem.setOnClickListener(v -> {
|
holder.binding.btnItem.setOnClickListener(v -> {
|
||||||
if(listener != null){
|
if(item.isActive && listener != null){
|
||||||
listener.onItemClick(position);
|
listener.onItemClick(position);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -100,10 +100,18 @@ 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(decimalEnabled);
|
((NumberKeyboard) keyboardView).setDecimalEnable(isDecimalEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(sharedViewModel.isEcr.getValue() != null){
|
if(sharedViewModel.isEcr.getValue() != null){
|
||||||
|
|||||||
@ -405,7 +405,7 @@ public class SharedViewModel extends ViewModel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void startPrintProcessSettlement() {
|
public void startPrintProcessSettlement() {
|
||||||
|
|
||||||
if(payDetail.getValue() == null) return;
|
if(payDetail.getValue() == null) return;
|
||||||
|
|
||||||
|
|||||||
@ -106,6 +106,9 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -210,7 +213,10 @@ 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,12 +17,14 @@ 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;
|
||||||
|
|
||||||
@ -33,9 +35,6 @@ 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;
|
||||||
|
|
||||||
@ -54,12 +53,20 @@ 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),
|
// new QRPayItem("Sale", R.drawable.ic_qr_pay, true),
|
||||||
new QRPayItem("Refund", R.drawable.ic_refund),
|
// new QRPayItem("Refund", R.drawable.ic_refund, false),
|
||||||
new QRPayItem("History", R.drawable.ic_history)
|
// new QRPayItem("History", R.drawable.ic_history, true)
|
||||||
);
|
// );
|
||||||
|
|
||||||
QRPayAdapter adapter = new QRPayAdapter(features, position -> {
|
QRPayAdapter adapter = new QRPayAdapter(features, position -> {
|
||||||
QRPayItem selectedBtn = features.get(position);
|
QRPayItem selectedBtn = features.get(position);
|
||||||
|
|||||||
@ -3,9 +3,12 @@ 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) {
|
public QRPayItem(String title, int icon, boolean isActive) {
|
||||||
this.title = title;
|
this.title = title;
|
||||||
this.icon = icon;
|
this.icon = icon;
|
||||||
|
this.isActive = isActive;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,6 +11,7 @@ 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;
|
||||||
@ -49,8 +50,8 @@ public class HostConfigFragment extends DataBindingFragment {
|
|||||||
|
|
||||||
private HostConfigViewModel viewModel;
|
private HostConfigViewModel viewModel;
|
||||||
protected Printer printer;
|
protected Printer printer;
|
||||||
int FONT_NORMAL = 20;
|
int FONT_NORMAL = 24;
|
||||||
int FONT_HEADER = 28;
|
int FONT_HEADER = 30;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initViewModel() {
|
protected void initViewModel() {
|
||||||
@ -112,58 +113,56 @@ public class HostConfigFragment extends DataBindingFragment {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
printer.setGray(GrayLevelEnum.LEVEL_2);
|
printer.setGray(GrayLevelEnum.LEVEL_2);
|
||||||
printer.setTypeface(Typeface.SANS_SERIF);
|
Typeface typeface = ResourcesCompat.getFont(requireContext(), R.font.consolas_regular);
|
||||||
|
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.LEFT, false);
|
printer.appendPrnStr(sp.getMerchantName(), FONT_NORMAL, AlignEnum.CENTER, 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,5 +21,6 @@ public enum FeaturesType {
|
|||||||
TEST,
|
TEST,
|
||||||
QR_INQUIRY,
|
QR_INQUIRY,
|
||||||
QR_REFUND,
|
QR_REFUND,
|
||||||
LOG_OUT
|
LOG_OUT,
|
||||||
|
DEVICE_CONFIG
|
||||||
}
|
}
|
||||||
@ -602,8 +602,11 @@ 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,7 +177,6 @@ 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());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -220,7 +219,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() {
|
||||||
|
|||||||
BIN
app/src/main/res/drawable/kbz_receipt_logo.png
Normal file
BIN
app/src/main/res/drawable/kbz_receipt_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
BIN
app/src/main/res/font/consolas_regular.ttf
Normal file
BIN
app/src/main/res/font/consolas_regular.ttf
Normal file
Binary file not shown.
@ -167,6 +167,9 @@
|
|||||||
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,11 +7,8 @@
|
|||||||
<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="text"
|
name="item"
|
||||||
type="String" />
|
type="com.utsmm.kbz.ui.qr_pay.QRPayItem" />
|
||||||
<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"
|
||||||
@ -25,8 +22,6 @@
|
|||||||
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"
|
||||||
@ -48,7 +43,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="@{icon}"
|
app:srcUrl="@{item.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" />
|
||||||
@ -60,7 +55,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="@{text}"
|
android:text="@{item.title}"
|
||||||
tools:text="button title"
|
tools:text="button title"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textColor="@color/colorPrimary"
|
android:textColor="@color/colorPrimary"
|
||||||
|
|||||||
@ -629,6 +629,12 @@
|
|||||||
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.2.aar'))
|
artifacts.add("default", file('nexgo-sdk-dlkey-1.0.3.aar'))
|
||||||
@ -0,0 +1 @@
|
|||||||
|
i/AndroidManifest.xml
|
||||||
@ -0,0 +1 @@
|
|||||||
|
o/com.nexgo.downloadkey-r.txt
|
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1 @@
|
|||||||
|
i/jni
|
||||||
@ -0,0 +1 @@
|
|||||||
|
o/nexgo-sdk-dlkey-1.0.3-api.jar
|
||||||
Binary file not shown.
@ -0,0 +1 @@
|
|||||||
|
o/nexgo-sdk-dlkey-1.0.3-runtime.jar
|
||||||
Binary file not shown.
@ -0,0 +1 @@
|
|||||||
|
o/com.nexgo.downloadkey
|
||||||
@ -0,0 +1 @@
|
|||||||
|
o/nexgo-sdk-dlkey-1.0.3
|
||||||
@ -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/jars/classes.jar
|
||||||
@ -0,0 +1 @@
|
|||||||
|
i/
|
||||||
@ -0,0 +1 @@
|
|||||||
|
i/res
|
||||||
@ -0,0 +1 @@
|
|||||||
|
i/
|
||||||
@ -0,0 +1 @@
|
|||||||
|
o/nexgo-sdk-dlkey-1.0.3-runtime
|
||||||
Binary file not shown.
BIN
nexdlkey-lib/nexgo-sdk-dlkey-1.0.3.aar
Normal file
BIN
nexdlkey-lib/nexgo-sdk-dlkey-1.0.3.aar
Normal file
Binary file not shown.
@ -1573,4 +1573,25 @@ 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,6 +238,9 @@ 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;
|
||||||
}
|
}
|
||||||
@ -932,6 +935,22 @@ 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