SiriusTerminal added
added new reponse for SiriusTerminal
This commit is contained in:
parent
7d8f9f5af2
commit
cca1b6ded6
4
.kotlin/errors/errors-1765897570399.log
Normal file
4
.kotlin/errors/errors-1765897570399.log
Normal file
@ -0,0 +1,4 @@
|
||||
kotlin version: 2.0.21
|
||||
error message: The daemon has terminated unexpectedly on startup attempt #1 with error code: 0. The daemon process output:
|
||||
1. Kotlin compile daemon is ready
|
||||
|
||||
@ -14,8 +14,8 @@ android {
|
||||
applicationId "com.utsmm.kbz"
|
||||
minSdk 24
|
||||
targetSdk 33
|
||||
versionCode 1
|
||||
versionName "1.00"
|
||||
versionCode 2
|
||||
versionName "1.01"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.utsmm.kbz.ui.qr_pay;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@ -145,6 +146,9 @@ public class QRRefundProcessFragment extends DataBindingFragment {
|
||||
LogUtil.d(TAG, "Refund successful!");
|
||||
|
||||
String refundAmount = response.getResponse().getRefundAmount();
|
||||
Log.d(TAG, "refund amount -> " + refundAmount);
|
||||
long text = POSUtil.getInstance().convertAmount(refundAmount);
|
||||
Log.d(TAG, "refund amount but long -> " + text);
|
||||
|
||||
String dateTime = SystemDateTime.getTodayDateFormat() + " " + SystemDateTime.getTodayTimeFormat();
|
||||
payDetail.setTC(response.getResponse().getRefundStatus());
|
||||
|
||||
@ -124,6 +124,7 @@ public class HostConfigFragment extends DataBindingFragment {
|
||||
printer.appendPrnStr(sp.getMerchantName(), 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("TERMINAL : " + sp.getTerminalName(), FONT_NORMAL, AlignEnum.LEFT, true);
|
||||
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);
|
||||
|
||||
@ -10,6 +10,7 @@ import com.utsmyanmar.baselib.network.model.sirius.SiriusHost;
|
||||
import com.utsmyanmar.baselib.network.model.sirius.SiriusMerchant;
|
||||
import com.utsmyanmar.baselib.network.model.sirius.SiriusProperty;
|
||||
import com.utsmyanmar.baselib.network.model.sirius.SiriusResponse;
|
||||
import com.utsmyanmar.baselib.network.model.sirius.SiriusTerminal;
|
||||
import com.utsmyanmar.paylibs.utils.core_utils.SystemParamsOperation;
|
||||
import com.utsmyanmar.paylibs.utils.core_utils.SystemParamsSettings;
|
||||
import com.utsmyanmar.paylibs.utils.enums.CurrencyType;
|
||||
@ -131,6 +132,8 @@ public class TMSSetupsImpl implements TMSSetups{
|
||||
|
||||
SiriusMerchant siriusMerchant = siriusResponse.getMerchant();
|
||||
|
||||
SiriusTerminal siriusTerminal = siriusResponse.getTerminal();
|
||||
|
||||
List<SiriusHost> siriusHosts = siriusResponse.getHosts();
|
||||
|
||||
List<SiriusProperty> siriusProperties = siriusResponse.getProperties();
|
||||
@ -161,6 +164,10 @@ public class TMSSetupsImpl implements TMSSetups{
|
||||
|
||||
}
|
||||
|
||||
if(siriusTerminal != null){
|
||||
SystemParamsOperation.getInstance().setTerminalName(siriusTerminal.getName());
|
||||
}
|
||||
|
||||
if(siriusResponse.getAddress() != null && !siriusResponse.getAddress().isEmpty()) {
|
||||
SystemParamsOperation.getInstance().setMerchantAddress(siriusResponse.getAddress());
|
||||
}
|
||||
|
||||
@ -18,7 +18,9 @@ public class SiriusResponse {
|
||||
|
||||
private List<SiriusProperty> properties;
|
||||
|
||||
public SiriusResponse(String serial, String ecrKey,String address,String address2, SiriusMerchant merchant, List<SiriusHost> hosts, List<SiriusProperty> properties) {
|
||||
private SiriusTerminal terminal;
|
||||
|
||||
public SiriusResponse(String serial, String ecrKey,String address,String address2, SiriusMerchant merchant, List<SiriusHost> hosts, List<SiriusProperty> properties, SiriusTerminal terminal) {
|
||||
this.serial = serial;
|
||||
this.ecrKey = ecrKey;
|
||||
this.address = address;
|
||||
@ -26,6 +28,7 @@ public class SiriusResponse {
|
||||
this.merchant = merchant;
|
||||
this.hosts = hosts;
|
||||
this.properties = properties;
|
||||
this.terminal = terminal;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
@ -55,6 +58,7 @@ public class SiriusResponse {
|
||||
public void setMerchant(SiriusMerchant merchant) {
|
||||
this.merchant = merchant;
|
||||
}
|
||||
public void setTerminal(SiriusTerminal terminal){ this.terminal = terminal; }
|
||||
|
||||
public void setHosts(List<SiriusHost> hosts) {
|
||||
this.hosts = hosts;
|
||||
@ -76,6 +80,8 @@ public class SiriusResponse {
|
||||
return merchant;
|
||||
}
|
||||
|
||||
public SiriusTerminal getTerminal(){ return terminal; }
|
||||
|
||||
public List<SiriusHost> getHosts() {
|
||||
return hosts;
|
||||
}
|
||||
|
||||
@ -0,0 +1,89 @@
|
||||
package com.utsmyanmar.baselib.network.model.sirius;
|
||||
|
||||
public class SiriusTerminal {
|
||||
private int id;
|
||||
private String name;
|
||||
private String serialNumber;
|
||||
private String ercKey;
|
||||
private String address;
|
||||
private String address2;
|
||||
private int terminalTypeId;
|
||||
private String terminalModel;
|
||||
|
||||
public SiriusTerminal(int id, String name, String serialNumber, String ercKey, String address, String address2, int terminalTypeId, String terminalModel){
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.serialNumber = serialNumber;
|
||||
this.ercKey = ercKey;
|
||||
this.address = address;
|
||||
this.address2 = address2;
|
||||
this.terminalTypeId = terminalTypeId;
|
||||
this.terminalModel = terminalModel;
|
||||
}
|
||||
|
||||
//getter
|
||||
public int getId(){
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getName(){
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getSerialNumber(){
|
||||
return serialNumber;
|
||||
}
|
||||
|
||||
public String getErcKey(){
|
||||
return ercKey;
|
||||
}
|
||||
|
||||
public String getAddress(){
|
||||
return address;
|
||||
}
|
||||
|
||||
public String getAddress2(){
|
||||
return address2;
|
||||
}
|
||||
|
||||
public String getTerminalModel(){
|
||||
return terminalModel;
|
||||
}
|
||||
|
||||
public int getTerminalTypeId(){
|
||||
return terminalTypeId;
|
||||
}
|
||||
|
||||
public void setId(int id){
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public void setName(String name){
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setErcKey(String ercKey){
|
||||
this.ercKey = ercKey;
|
||||
}
|
||||
|
||||
public void setAddress(String address){
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public void setAddress2(String address2){
|
||||
this.address2 = address2;
|
||||
}
|
||||
|
||||
public void setSerialNumber(String serialNumber){
|
||||
this.serialNumber = serialNumber;
|
||||
}
|
||||
|
||||
public void setTerminalTypeId(int terminalTypeId){
|
||||
this.terminalTypeId = terminalTypeId;
|
||||
}
|
||||
|
||||
public void setTerminalModel(String terminalModel){
|
||||
this.terminalModel = terminalModel;
|
||||
}
|
||||
|
||||
}
|
||||
@ -623,6 +623,10 @@ public abstract class BaseXPrint {
|
||||
printer.appendPrnStr(first + " " + second, fontNormal, AlignEnum.CENTER,true);
|
||||
}
|
||||
|
||||
protected void print2ColumnsStringBoldCenter(String first, String second, AlignEnum align) {
|
||||
printer.appendPrnStr(first + " " + second, fontNormal, align,true);
|
||||
}
|
||||
|
||||
protected void print3ColumnsString(String first, String second, String third) {
|
||||
// printer.appendPrnStr(first + " " + second + " " + third, fontNormal, AlignEnum.LEFT,false);
|
||||
printer.appendPrnStr(first + " " + second + " " + third, fontNormal, AlignEnum.LEFT,false);
|
||||
@ -786,7 +790,7 @@ public abstract class BaseXPrint {
|
||||
// printer.printText("SIGN : -----------------------------", innerResultCallback);
|
||||
// }
|
||||
|
||||
emptyLine(1);
|
||||
emptyLine(0);
|
||||
printer.appendPrnStr("I AGREE TO PAY THE ABOVE TOTAL AMOUNT", fontSmall, AlignEnum.CENTER,false);
|
||||
if (isQR) {
|
||||
printer.appendPrnStr("ACCORDING TO THE ISSUER AGREEMENT", fontSmall, AlignEnum.CENTER,false);
|
||||
|
||||
@ -336,15 +336,14 @@ public class PrintXImpl extends BaseXPrint implements PrintX {
|
||||
|
||||
|
||||
if (!(payDetail.getQrTransStatus() != 1 && (payDetail.getTransactionType() == TransactionsType.MMQR_REFUND.value || payDetail.getTransactionType() == TransactionsType.MMQR.value))) {
|
||||
emptyLine(1);
|
||||
emptyLine(0);
|
||||
}
|
||||
// check is pin change
|
||||
|
||||
if (payDetail.getQrTransStatus() == 1) {
|
||||
|
||||
|
||||
boolean isNeedMinusSign = payDetail.getTransactionType() == TransactionsType.MMQR_REFUND.value;
|
||||
print2ColumnsStringBoldCenter("TOTAL MMK", isNeedMinusSign? "- "+PrintUtils.getInstance().getSeparatorNumberFormat(payDetail.getAmount()): PrintUtils.getInstance().getSeparatorNumberFormat(payDetail.getAmount()));
|
||||
print2ColumnsStringBoldCenter("TOTAL MMK", isNeedMinusSign? "- "+PrintUtils.getInstance().getSeparatorNumberFormat(payDetail.getAmount()): PrintUtils.getInstance().getSeparatorNumberFormat(payDetail.getAmount()), AlignEnum.LEFT);
|
||||
|
||||
// if(payDetail.getTransactionType() == TransactionsType.MMQR.value) {
|
||||
// String data = payDetail.getReferNo()+"-"+payDetail.getAmount()+"-"+payDetail.getQrTransId()+"-"+payDetail.getMerchantNo()+"-"+payDetail.getCustomerMobile().toUpperCase()+"-"+payDetail.getOriginalTransDate();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user