preauth/preauth cancel/preauth comp added manual entry flag
This commit is contained in:
parent
890b1c55a8
commit
ed5fadcdd6
@ -168,12 +168,29 @@ public class ProcessingCardFragment extends DataBindingFragment {
|
|||||||
transProcessViewModel.setTradeData(tradeData);
|
transProcessViewModel.setTradeData(tradeData);
|
||||||
pinPadViewModel.setTradeData(tradeData);
|
pinPadViewModel.setTradeData(tradeData);
|
||||||
|
|
||||||
if(sharedViewModel.getTransactionsType().getValue() == TransactionsType.PRE_AUTH_VOID ) {
|
if(sharedViewModel.getTransactionsType().getValue() == TransactionsType.PRE_AUTH_VOID && SystemParamsOperation.getInstance().getPreAuthVoidManualEnabled() ) {
|
||||||
|
|
||||||
sharedViewModel.set_errorFragmentMsg(getResourceString(R.string.txt_alert_pre_auth_cancel));
|
sharedViewModel.set_errorFragmentMsg(getResourceString(R.string.txt_alert_pre_auth_cancel));
|
||||||
routeId = R.id.action_processingCardFragment_to_errorFragment;
|
routeId = R.id.action_processingCardFragment_to_errorFragment;
|
||||||
safeNavigateToRouteId();
|
safeNavigateToRouteId();
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
if(sharedViewModel.getTransactionsType().getValue() == TransactionsType.PRE_AUTH_SALE && SystemParamsOperation.getInstance().getPreAuthManualEnabled()) {
|
||||||
|
|
||||||
|
sharedViewModel.set_errorFragmentMsg(getResourceString(R.string.txt_alert_pre_auth_cancel));
|
||||||
|
routeId = R.id.action_processingCardFragment_to_errorFragment;
|
||||||
|
safeNavigateToRouteId();
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
if(sharedViewModel.getTransactionsType().getValue() == TransactionsType.PRE_AUTH_COMPLETE && SystemParamsOperation.getInstance().getPreAuthCompleteManualEnabled()) {
|
||||||
|
|
||||||
|
sharedViewModel.set_errorFragmentMsg(getResourceString(R.string.txt_alert_pre_auth_cancel));
|
||||||
|
routeId = R.id.action_processingCardFragment_to_errorFragment;
|
||||||
|
safeNavigateToRouteId();
|
||||||
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
// else if(sharedViewModel.transactionsType.getValue() == TransactionsType.REFUND) {
|
// else if(sharedViewModel.transactionsType.getValue() == TransactionsType.REFUND) {
|
||||||
// sharedViewModel.set_errorFragmentMsg(getResourceString(R.string.txt_card_not_supported));
|
// sharedViewModel.set_errorFragmentMsg(getResourceString(R.string.txt_card_not_supported));
|
||||||
@ -238,13 +255,28 @@ public class ProcessingCardFragment extends DataBindingFragment {
|
|||||||
transProcessViewModel.setTradeData(tradeData);
|
transProcessViewModel.setTradeData(tradeData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(sharedViewModel.getTransactionsType().getValue() == TransactionsType.PRE_AUTH_VOID && SystemParamsOperation.getInstance().getPreAuthVoidManualEnabled() ) {
|
||||||
if(sharedViewModel.getTransactionsType().getValue() == TransactionsType.PRE_AUTH_VOID ) {
|
|
||||||
|
|
||||||
sharedViewModel.set_errorFragmentMsg(getResourceString(R.string.txt_alert_pre_auth_cancel));
|
sharedViewModel.set_errorFragmentMsg(getResourceString(R.string.txt_alert_pre_auth_cancel));
|
||||||
routeId = R.id.action_processingCardFragment_to_errorFragment;
|
routeId = R.id.action_processingCardFragment_to_errorFragment;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if(sharedViewModel.getTransactionsType().getValue() == TransactionsType.PRE_AUTH_SALE && SystemParamsOperation.getInstance().getPreAuthManualEnabled()) {
|
||||||
|
|
||||||
|
sharedViewModel.set_errorFragmentMsg(getResourceString(R.string.txt_alert_pre_auth_cancel));
|
||||||
|
routeId = R.id.action_processingCardFragment_to_errorFragment;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
if(sharedViewModel.getTransactionsType().getValue() == TransactionsType.PRE_AUTH_COMPLETE && SystemParamsOperation.getInstance().getPreAuthCompleteManualEnabled()) {
|
||||||
|
|
||||||
|
sharedViewModel.set_errorFragmentMsg(getResourceString(R.string.txt_alert_pre_auth_cancel));
|
||||||
|
routeId = R.id.action_processingCardFragment_to_errorFragment;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// else if(sharedViewModel.transactionsType.getValue() == TransactionsType.REFUND) {
|
// else if(sharedViewModel.transactionsType.getValue() == TransactionsType.REFUND) {
|
||||||
// routeId = R.id.action_processingCardFragment_to_errorFragment;
|
// routeId = R.id.action_processingCardFragment_to_errorFragment;
|
||||||
// }
|
// }
|
||||||
@ -274,8 +306,39 @@ public class ProcessingCardFragment extends DataBindingFragment {
|
|||||||
emvTransactionViewModel.transType.setValue(sharedViewModel.transactionsType.getValue());
|
emvTransactionViewModel.transType.setValue(sharedViewModel.transactionsType.getValue());
|
||||||
|
|
||||||
if (SystemParamsOperation.getInstance().isEmvEnabled()) {
|
if (SystemParamsOperation.getInstance().isEmvEnabled()) {
|
||||||
|
|
||||||
prepareEmvTransaction();
|
prepareEmvTransaction();
|
||||||
|
|
||||||
|
if(sharedViewModel.getTransactionsType().getValue() == TransactionsType.PRE_AUTH_VOID && SystemParamsOperation.getInstance().getPreAuthVoidManualEnabled() ) {
|
||||||
|
|
||||||
|
sharedViewModel.set_errorFragmentMsg(getResourceString(R.string.txt_alert_pre_auth_cancel));
|
||||||
|
routeId = R.id.action_processingCardFragment_to_errorFragment;
|
||||||
|
safeNavigateToRouteId();
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
if(sharedViewModel.getTransactionsType().getValue() == TransactionsType.PRE_AUTH_SALE && SystemParamsOperation.getInstance().getPreAuthManualEnabled()) {
|
||||||
|
|
||||||
|
sharedViewModel.set_errorFragmentMsg(getResourceString(R.string.txt_alert_pre_auth_cancel));
|
||||||
|
routeId = R.id.action_processingCardFragment_to_errorFragment;
|
||||||
|
safeNavigateToRouteId();
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
if(sharedViewModel.getTransactionsType().getValue() == TransactionsType.PRE_AUTH_COMPLETE && SystemParamsOperation.getInstance().getPreAuthCompleteManualEnabled()) {
|
||||||
|
|
||||||
|
sharedViewModel.set_errorFragmentMsg(getResourceString(R.string.txt_alert_pre_auth_cancel));
|
||||||
|
routeId = R.id.action_processingCardFragment_to_errorFragment;
|
||||||
|
safeNavigateToRouteId();
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
routeId = R.id.action_processingCardFragment_to_emvTransactionFragment;
|
routeId = R.id.action_processingCardFragment_to_emvTransactionFragment;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
routeId = R.id.action_processingCardFragment_to_errorFragment;
|
routeId = R.id.action_processingCardFragment_to_errorFragment;
|
||||||
sharedViewModel.set_errorFragmentMsg(getResourceString(R.string.txt_please_enable_emv));
|
sharedViewModel.set_errorFragmentMsg(getResourceString(R.string.txt_please_enable_emv));
|
||||||
@ -307,9 +370,7 @@ public class ProcessingCardFragment extends DataBindingFragment {
|
|||||||
LogUtil.d(TAG,"card type:"+cardType);
|
LogUtil.d(TAG,"card type:"+cardType);
|
||||||
LogUtil.d(TAG,"is MPU:"+isMPU);
|
LogUtil.d(TAG,"is MPU:"+isMPU);
|
||||||
|
|
||||||
// delayFunctionCall(()->{
|
|
||||||
//
|
|
||||||
// });
|
|
||||||
handlePreEmvProcess();
|
handlePreEmvProcess();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -650,6 +650,15 @@ public class TMSSetupsImpl implements TMSSetups{
|
|||||||
else if(TextUtils.equals(name, "printer_enabled")){
|
else if(TextUtils.equals(name, "printer_enabled")){
|
||||||
SystemParamsOperation.getInstance().setPrinterEnabled(parseBoolean(data));
|
SystemParamsOperation.getInstance().setPrinterEnabled(parseBoolean(data));
|
||||||
}
|
}
|
||||||
|
else if(TextUtils.equals(name, "pre_auth_cancel_manual_enabled")) {
|
||||||
|
SystemParamsOperation.getInstance().setPreAuthVoidManualEnabled(parseBoolean(data));
|
||||||
|
}
|
||||||
|
else if(TextUtils.equals(name, "pre_auth_complete_manual_enabled")) {
|
||||||
|
SystemParamsOperation.getInstance().setPreAuthCompleteManualEnabled(parseBoolean(data));
|
||||||
|
}
|
||||||
|
else if(TextUtils.equals(name, "pre_auth_manual_enabled")) {
|
||||||
|
SystemParamsOperation.getInstance().setPreAuthManualEnabled(parseBoolean(data));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemParamsOperation.getInstance().setCarouselUrls(convertToString(imgUrls));
|
SystemParamsOperation.getInstance().setCarouselUrls(convertToString(imgUrls));
|
||||||
|
|||||||
@ -1761,4 +1761,38 @@ public class SystemParamsOperation {
|
|||||||
SystemParamsSettings paramsSettings = getSystemParamsSettings();
|
SystemParamsSettings paramsSettings = getSystemParamsSettings();
|
||||||
return paramsSettings.getPrinterEnabled();
|
return paramsSettings.getPrinterEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setPreAuthVoidManualEnabled(boolean preAuthVoidManualEnabled) {
|
||||||
|
SystemParamsSettings params = getSystemParamsSettings();
|
||||||
|
params.setPreAuthVoidManual(preAuthVoidManualEnabled);
|
||||||
|
saveSystemParamsSettings(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getPreAuthVoidManualEnabled() {
|
||||||
|
SystemParamsSettings params = getSystemParamsSettings();
|
||||||
|
return params.getPreAuthVoidManual();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPreAuthCompleteManualEnabled(boolean preAuthCompleteManualEnabled) {
|
||||||
|
SystemParamsSettings params = getSystemParamsSettings();
|
||||||
|
params.setPreAuthCompleteManual(preAuthCompleteManualEnabled);
|
||||||
|
saveSystemParamsSettings(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getPreAuthCompleteManualEnabled() {
|
||||||
|
SystemParamsSettings params = getSystemParamsSettings();
|
||||||
|
return params.getPreAuthCompleteManual();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPreAuthManualEnabled(boolean preAuthManualEnabled) {
|
||||||
|
SystemParamsSettings params = getSystemParamsSettings();
|
||||||
|
params.setPreAuthManual(preAuthManualEnabled);
|
||||||
|
saveSystemParamsSettings(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getPreAuthManualEnabled() {
|
||||||
|
SystemParamsSettings params = getSystemParamsSettings();
|
||||||
|
return params.getPreAuthManual();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -167,6 +167,10 @@ public class SystemParamsSettings implements Serializable {
|
|||||||
|
|
||||||
private boolean isClearBatch = false;
|
private boolean isClearBatch = false;
|
||||||
|
|
||||||
|
private boolean isPreAuthVoidManual = false;
|
||||||
|
private boolean isPreAuthCompleteManual = false;
|
||||||
|
private boolean isPreAuthManual = false;
|
||||||
|
|
||||||
private boolean ssl_switch_status = false;
|
private boolean ssl_switch_status = false;
|
||||||
|
|
||||||
private boolean connect_status = false;
|
private boolean connect_status = false;
|
||||||
@ -431,6 +435,7 @@ public class SystemParamsSettings implements Serializable {
|
|||||||
this.secHostMerchantId = secHostMerchantId;
|
this.secHostMerchantId = secHostMerchantId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected void setSecHostCurrency(String secHostCurrency) {
|
protected void setSecHostCurrency(String secHostCurrency) {
|
||||||
this.secHostCurrency = secHostCurrency;
|
this.secHostCurrency = secHostCurrency;
|
||||||
}
|
}
|
||||||
@ -495,6 +500,30 @@ public class SystemParamsSettings implements Serializable {
|
|||||||
|
|
||||||
protected boolean getQRPayStatus() { return qrpay_status; }
|
protected boolean getQRPayStatus() { return qrpay_status; }
|
||||||
|
|
||||||
|
protected void setPreAuthVoidManual(boolean status) {
|
||||||
|
this.isPreAuthVoidManual = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean getPreAuthVoidManual() {
|
||||||
|
return isPreAuthVoidManual;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setPreAuthCompleteManual(boolean status) {
|
||||||
|
this.isPreAuthCompleteManual = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean getPreAuthCompleteManual() {
|
||||||
|
return isPreAuthCompleteManual;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setPreAuthManual(boolean status) {
|
||||||
|
this.isPreAuthManual = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean getPreAuthManual() {
|
||||||
|
return isPreAuthManual;
|
||||||
|
}
|
||||||
|
|
||||||
protected boolean isAutoPrintCustomerCopy() {
|
protected boolean isAutoPrintCustomerCopy() {
|
||||||
return isAutoPrintCustomerCopy;
|
return isAutoPrintCustomerCopy;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user