fixed for shortCode
This commit is contained in:
parent
52ee779e18
commit
f2e797a0dc
@ -36,7 +36,7 @@ public class TransactionUtil {
|
|||||||
|
|
||||||
private TransactionUtil() {
|
private TransactionUtil() {
|
||||||
qrTerminalId = SystemParamsOperation.getInstance().getSecHostTerminalId();
|
qrTerminalId = SystemParamsOperation.getInstance().getSecHostTerminalId();
|
||||||
qrMerchantId = SystemParamsOperation.getInstance().getSecHostMerchantId();
|
qrMerchantId = SystemParamsOperation.getInstance().getShortCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getQRMerchantId() {
|
public String getQRMerchantId() {
|
||||||
|
|||||||
@ -172,11 +172,12 @@ public class TMSSetupsImpl implements TMSSetups{
|
|||||||
|
|
||||||
for (SiriusHost siriusHost: siriusHosts) {
|
for (SiriusHost siriusHost: siriusHosts) {
|
||||||
|
|
||||||
if( siriusHost.getName().toLowerCase().contains("mmqr") || siriusHost.getName().toLowerCase().contains("kbzpay") || siriusHost.getName().toLowerCase().contains("mmqr") || siriusHost.getName().toLowerCase().contains("qr")) {
|
if( siriusHost.getTyp().equals("QR")) {
|
||||||
|
|
||||||
SystemParamsOperation.getInstance().setSecHostName(siriusHost.getName());
|
SystemParamsOperation.getInstance().setSecHostName(siriusHost.getName());
|
||||||
SystemParamsOperation.getInstance().setSecHostTerminalId(siriusHost.getTid());
|
SystemParamsOperation.getInstance().setSecHostTerminalId(siriusHost.getTid());
|
||||||
SystemParamsOperation.getInstance().setSecHostMerchantId(extractDigits(siriusHost.getMid()));
|
SystemParamsOperation.getInstance().setSecHostMerchantId(extractDigits(siriusHost.getMid()));
|
||||||
|
SystemParamsOperation.getInstance().setShortCode(siriusHost.getShortCode());
|
||||||
|
|
||||||
|
|
||||||
if (siriusHost.getPrimaryIP().contains(":")) {
|
if (siriusHost.getPrimaryIP().contains(":")) {
|
||||||
@ -215,14 +216,8 @@ public class TMSSetupsImpl implements TMSSetups{
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (siriusHost.getTid().isEmpty() || siriusHost.getMid().isEmpty() ) {
|
if (siriusHost.getShortCode().isEmpty()) {
|
||||||
if(siriusHost.getTid().isEmpty()) {
|
SystemParamsOperation.getInstance().setShortCode("");
|
||||||
SystemParamsOperation.getInstance().setSecHostTerminalId("");
|
|
||||||
}
|
|
||||||
if(siriusHost.getMid().isEmpty()) {
|
|
||||||
SystemParamsOperation.getInstance().setSecHostMerchantId("");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -423,17 +418,23 @@ public class TMSSetupsImpl implements TMSSetups{
|
|||||||
} else if (TextUtils.equals(name,"qrpay_inquiry_status_enable")) {
|
} else if (TextUtils.equals(name,"qrpay_inquiry_status_enable")) {
|
||||||
|
|
||||||
SystemParamsOperation.getInstance().setQRPayInquiryStatus(parseBoolean(data));
|
SystemParamsOperation.getInstance().setQRPayInquiryStatus(parseBoolean(data));
|
||||||
|
|
||||||
} else if (TextUtils.equals(name,"tips_adjustment_enable")) {
|
} else if (TextUtils.equals(name,"tips_adjustment_enable")) {
|
||||||
|
|
||||||
SystemParamsOperation.getInstance().setTipsAdjustmentStatus(parseBoolean(data));
|
SystemParamsOperation.getInstance().setTipsAdjustmentStatus(parseBoolean(data));
|
||||||
|
|
||||||
} else if (TextUtils.equals(name,"qrpay_enable")) {
|
} else if (TextUtils.equals(name,"qrpay_enable")) {
|
||||||
|
|
||||||
SystemParamsOperation.getInstance().setQRPayStatus(parseBoolean(data));
|
SystemParamsOperation.getInstance().setQRPayStatus(parseBoolean(data));
|
||||||
|
|
||||||
} else if (TextUtils.equals(name, "qr_partial_refund_enable")){
|
} else if (TextUtils.equals(name, "qr_partial_refund_enable")){
|
||||||
|
|
||||||
SystemParamsOperation.getInstance().setQrPartialRefundEnable(parseBoolean(data));
|
SystemParamsOperation.getInstance().setQrPartialRefundEnable(parseBoolean(data));
|
||||||
|
|
||||||
} else if(TextUtils.equals(name, "mmqr_interval_waiting_time")){
|
} else if(TextUtils.equals(name, "mmqr_interval_waiting_time")){
|
||||||
|
|
||||||
SystemParamsOperation.getInstance().setWaveIntervalTime(data);
|
SystemParamsOperation.getInstance().setWaveIntervalTime(data);
|
||||||
|
|
||||||
} else if (TextUtils.equals(name,"print_iso_enable")) {
|
} else if (TextUtils.equals(name,"print_iso_enable")) {
|
||||||
|
|
||||||
SystemParamsOperation.getInstance().setPrintISOStatus(parseBoolean(data));
|
SystemParamsOperation.getInstance().setPrintISOStatus(parseBoolean(data));
|
||||||
@ -467,9 +468,6 @@ public class TMSSetupsImpl implements TMSSetups{
|
|||||||
} else if (TextUtils.equals(name,"manual_entry_enable")) {
|
} else if (TextUtils.equals(name,"manual_entry_enable")) {
|
||||||
|
|
||||||
SystemParamsOperation.getInstance().setManualEntyrStatus(parseBoolean(data));
|
SystemParamsOperation.getInstance().setManualEntyrStatus(parseBoolean(data));
|
||||||
} else if (TextUtils.equals(name,"mmqr_interval_waiting_time")) {
|
|
||||||
|
|
||||||
SystemParamsOperation.getInstance().setWaveIntervalTime(data);
|
|
||||||
} else if (TextUtils.equals(name,"full_void_preauth_enable")) {
|
} else if (TextUtils.equals(name,"full_void_preauth_enable")) {
|
||||||
|
|
||||||
SystemParamsOperation.getInstance().setFullVoidPreauthStatus(parseBoolean(data));
|
SystemParamsOperation.getInstance().setFullVoidPreauthStatus(parseBoolean(data));
|
||||||
@ -603,7 +601,7 @@ 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")) {
|
} else if (TextUtils.equals(name, "qr_decimal_enable")) {
|
||||||
SystemParamsOperation.getInstance().setQrDecimalEnable(parseBoolean(data));
|
SystemParamsOperation.getInstance().setQrDecimalEnable(parseBoolean(data));
|
||||||
} else if (TextUtils.equals(name, "qr_refund_enable")){
|
} else if (TextUtils.equals(name, "qr_refund_enable")){
|
||||||
SystemParamsOperation.getInstance().setQrRefundEnable(parseBoolean(data));
|
SystemParamsOperation.getInstance().setQrRefundEnable(parseBoolean(data));
|
||||||
|
|||||||
@ -15,6 +15,10 @@ public class SiriusHost {
|
|||||||
|
|
||||||
private String tid;
|
private String tid;
|
||||||
|
|
||||||
|
private String shortCode;
|
||||||
|
|
||||||
|
private String typ;
|
||||||
|
|
||||||
public SiriusHost(String name, String description, String primaryIP, String secondaryIP, String currency, String mid, String tid) {
|
public SiriusHost(String name, String description, String primaryIP, String secondaryIP, String currency, String mid, String tid) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.description = description;
|
this.description = description;
|
||||||
@ -53,6 +57,14 @@ public class SiriusHost {
|
|||||||
this.tid = tid;
|
this.tid = tid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setShortCode(String shortCode){
|
||||||
|
this.shortCode = shortCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTyp(String typ) {
|
||||||
|
this.typ = typ;
|
||||||
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
@ -80,4 +92,12 @@ public class SiriusHost {
|
|||||||
public String getTid() {
|
public String getTid() {
|
||||||
return tid;
|
return tid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getShortCode() {
|
||||||
|
return shortCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTyp() {
|
||||||
|
return typ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1390,6 +1390,17 @@ public class SystemParamsOperation {
|
|||||||
saveSystemParamsSettings(params);
|
saveSystemParamsSettings(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setShortCode(String shortCode) {
|
||||||
|
SystemParamsSettings params = getSystemParamsSettings();
|
||||||
|
params.setShortCode(shortCode);
|
||||||
|
saveSystemParamsSettings(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getShortCode() {
|
||||||
|
SystemParamsSettings params = getSystemParamsSettings();
|
||||||
|
return params.getShortCode();
|
||||||
|
}
|
||||||
|
|
||||||
public String getSecHostMerchantId() {
|
public String getSecHostMerchantId() {
|
||||||
SystemParamsSettings params = getSystemParamsSettings();
|
SystemParamsSettings params = getSystemParamsSettings();
|
||||||
return params.getSecHostMerchantId();
|
return params.getSecHostMerchantId();
|
||||||
|
|||||||
@ -106,6 +106,8 @@ public class SystemParamsSettings implements Serializable {
|
|||||||
|
|
||||||
private String secHostMerchantId = "";
|
private String secHostMerchantId = "";
|
||||||
|
|
||||||
|
private String shortCode = "";
|
||||||
|
|
||||||
private String secHostCurrency = "";
|
private String secHostCurrency = "";
|
||||||
|
|
||||||
private String disabledMessage = "";
|
private String disabledMessage = "";
|
||||||
@ -349,6 +351,14 @@ public class SystemParamsSettings implements Serializable {
|
|||||||
this.uPiCvMLimit = amount;
|
this.uPiCvMLimit = amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void setShortCode(String shortCode) {
|
||||||
|
this.shortCode = shortCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected String getShortCode() {
|
||||||
|
return this.shortCode;
|
||||||
|
}
|
||||||
|
|
||||||
protected long getuPiCvMLimit() {
|
protected long getuPiCvMLimit() {
|
||||||
return this.uPiCvMLimit;
|
return this.uPiCvMLimit;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user