|
|
|
@ -27,7 +27,7 @@ namespace ECR_N5_DLL_TestUI |
|
|
|
private string dataBits = "8"; |
|
|
|
private string dataBits = "8"; |
|
|
|
private string stopBits = "One"; |
|
|
|
private string stopBits = "One"; |
|
|
|
private string parity = "None"; |
|
|
|
private string parity = "None"; |
|
|
|
private string timeOut = "180000"; |
|
|
|
private string timeOut = "15000"; |
|
|
|
|
|
|
|
|
|
|
|
private string thisEvent; |
|
|
|
private string thisEvent; |
|
|
|
|
|
|
|
|
|
|
|
@ -46,6 +46,9 @@ namespace ECR_N5_DLL_TestUI |
|
|
|
public string batchIdTextBoxValue = null; |
|
|
|
public string batchIdTextBoxValue = null; |
|
|
|
public string settleDateTextBoxValue = null; |
|
|
|
public string settleDateTextBoxValue = null; |
|
|
|
public string expDateTextBoxValue = null; |
|
|
|
public string expDateTextBoxValue = null; |
|
|
|
|
|
|
|
public string oriTxnDateTextBoxValue = null; |
|
|
|
|
|
|
|
public string hostRefNoTextBoxValue = null; |
|
|
|
|
|
|
|
public string paymentTypeTextBoxValue = null; |
|
|
|
private n5coredll.N5Core n5Core = null; |
|
|
|
private n5coredll.N5Core n5Core = null; |
|
|
|
private bool n5CoreInitSuccess = false; |
|
|
|
private bool n5CoreInitSuccess = false; |
|
|
|
|
|
|
|
|
|
|
|
@ -54,16 +57,20 @@ namespace ECR_N5_DLL_TestUI |
|
|
|
private string txnIdForPreAuth = null; |
|
|
|
private string txnIdForPreAuth = null; |
|
|
|
private string txnIdForOffline = null; |
|
|
|
private string txnIdForOffline = null; |
|
|
|
private string txnIdForAdjust = null; |
|
|
|
private string txnIdForAdjust = null; |
|
|
|
|
|
|
|
private string txnIdForCreateOrder = null; |
|
|
|
|
|
|
|
private string enquiryPeriod = null; |
|
|
|
|
|
|
|
|
|
|
|
private string saleRequestMsg = null; |
|
|
|
private string saleRequestMsg = null; |
|
|
|
private string preAuthRequestMsg = null; |
|
|
|
private string preAuthRequestMsg = null; |
|
|
|
private string offlineRequestMsg = null; |
|
|
|
private string offlineRequestMsg = null; |
|
|
|
private string adjustRequestMsg = null; |
|
|
|
private string adjustRequestMsg = null; |
|
|
|
|
|
|
|
private string createOrderRequestMsg = null; |
|
|
|
private string refundRequestMsg = null; |
|
|
|
private string refundRequestMsg = null; |
|
|
|
private string retrievalRequestMsg = null; |
|
|
|
private string retrievalRequestMsg = null; |
|
|
|
private string voidRequestMsg = null; |
|
|
|
private string voidRequestMsg = null; |
|
|
|
private string settlementRequestMsg = null; |
|
|
|
private string settlementRequestMsg = null; |
|
|
|
|
|
|
|
private string getInfoRequestMsg = null; |
|
|
|
|
|
|
|
private string checkUpdateRequestMsg = null; |
|
|
|
private string linkTestRequestMsg = null; |
|
|
|
private string linkTestRequestMsg = null; |
|
|
|
private string reprintRequestMsg = null; |
|
|
|
private string reprintRequestMsg = null; |
|
|
|
private string terminaionRequestMsg = null; |
|
|
|
private string terminaionRequestMsg = null; |
|
|
|
@ -72,18 +79,45 @@ namespace ECR_N5_DLL_TestUI |
|
|
|
private string addPointRequestMsg = null; |
|
|
|
private string addPointRequestMsg = null; |
|
|
|
private string batchEnquiryRequestMsg = null; |
|
|
|
private string batchEnquiryRequestMsg = null; |
|
|
|
private string settleEnquiryRequestMsg = null; |
|
|
|
private string settleEnquiryRequestMsg = null; |
|
|
|
|
|
|
|
private string summaryEnquiryRequestMsg = null; |
|
|
|
|
|
|
|
private string checkHealthRequestMsg = null; |
|
|
|
|
|
|
|
|
|
|
|
private Boolean isRepeatSubmit = false; |
|
|
|
private Boolean isRepeatSubmit = false; |
|
|
|
public MainWindow() |
|
|
|
public MainWindow() |
|
|
|
{ |
|
|
|
{ |
|
|
|
InitializeComponent(); |
|
|
|
InitializeComponent(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void requestSummaryEnquiryThead() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jsonResultByThead = n5Core.sendSummaryEnquiryRequest(enquiryPeriod); |
|
|
|
|
|
|
|
this.requestStrByThead = this.summaryEnquiryRequestMsg; |
|
|
|
|
|
|
|
showResult(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void requestCheckHealthThead() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jsonResultByThead = n5Core.sendCheckHealth(); |
|
|
|
|
|
|
|
this.requestStrByThead = this.checkHealthRequestMsg; |
|
|
|
|
|
|
|
showResult(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void requestOfflineThead() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jsonResultByThead = n5Core.processOffline(txnIdForOffline, txnAmtTextBoxValue, paymentAppIdComboBoxValue, authCodeTextBoxValue, panTextBoxValue, expDateTextBoxValue); |
|
|
|
|
|
|
|
this.requestStrByThead = this.offlineRequestMsg; |
|
|
|
|
|
|
|
showResult(); |
|
|
|
|
|
|
|
} |
|
|
|
private void requestSaleThead() |
|
|
|
private void requestSaleThead() |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
n5Core.sendLinkTestRequest(); |
|
|
|
if (panTextBoxValue!=null && panTextBoxValue!= "" && expDateTextBoxValue!=null && expDateTextBoxValue!="") |
|
|
|
if (panTextBoxValue!=null && panTextBoxValue!= "" && expDateTextBoxValue!=null && expDateTextBoxValue!="") |
|
|
|
jsonResultByThead = n5Core.requestSale(txnIdForSale, txnAmtTextBoxValue, "0", paymentAppIdComboBoxValue, qrValueTextBoxValue); |
|
|
|
jsonResultByThead = n5Core.requestSale(txnIdForSale, txnAmtTextBoxValue, "0", paymentAppIdComboBoxValue, qrValueTextBoxValue,"30000"); |
|
|
|
else |
|
|
|
else |
|
|
|
jsonResultByThead = n5Core.requestSale(txnIdForSale, txnAmtTextBoxValue, "0", paymentAppIdComboBoxValue, qrValueTextBoxValue); |
|
|
|
jsonResultByThead = n5Core.requestSale(txnIdForSale, txnAmtTextBoxValue, "0", paymentAppIdComboBoxValue, qrValueTextBoxValue, "30000"); |
|
|
|
|
|
|
|
//jsonResultByThead = n5Core.requestInstallment(txnIdForSale, txnAmtTextBoxValue, paymentAppIdComboBoxValue,"12", qrValueTextBoxValue, "30000"); |
|
|
|
this.requestStrByThead = this.saleRequestMsg; |
|
|
|
this.requestStrByThead = this.saleRequestMsg; |
|
|
|
showResult(); |
|
|
|
showResult(); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -93,29 +127,31 @@ namespace ECR_N5_DLL_TestUI |
|
|
|
this.requestStrByThead = this.preAuthRequestMsg; |
|
|
|
this.requestStrByThead = this.preAuthRequestMsg; |
|
|
|
showResult(); |
|
|
|
showResult(); |
|
|
|
} |
|
|
|
} |
|
|
|
private void requestOfflineThead() |
|
|
|
private void requestCreateOrderThread() |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
jsonResultByThead = n5Core.requestCreateOrder(txnIdForCreateOrder, txnAmtTextBoxValue, paymentTypeTextBoxValue, "30000"); |
|
|
|
jsonResultByThead = n5Core.processOffline(txnIdForOffline, txnAmtTextBoxValue, paymentAppIdComboBoxValue, authCodeTextBoxValue, panTextBoxValue, expDateTextBoxValue); |
|
|
|
this.requestStrByThead = this.createOrderRequestMsg; |
|
|
|
this.requestStrByThead = this.offlineRequestMsg; |
|
|
|
|
|
|
|
showResult(); |
|
|
|
showResult(); |
|
|
|
} |
|
|
|
} |
|
|
|
private void requestAdjustThead() |
|
|
|
private void requestAdjustThead() |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
//jsonResultByThead = n5Core.processOffline(txnIdForOffline, txnAmtTextBoxValue, paymentAppIdComboBoxValue, "123456", panTextBoxValue, expDateTextBoxValue); |
|
|
|
//jsonResultByThead = n5Core.processOffline(txnIdForOffline, txnAmtTextBoxValue, paymentAppIdComboBoxValue, "123456", panTextBoxValue, expDateTextBoxValue); |
|
|
|
// this.requestStrByThead = this.offlineRequestMsg; |
|
|
|
// this.requestStrByThead = this.offlineRequestMsg; |
|
|
|
// showResult(); |
|
|
|
// showResult(); |
|
|
|
|
|
|
|
jsonResultByThead = n5Core.processAdjust(txnIdForPreAuth, txnAmtTextBoxValue, "0", paymentAppIdComboBoxValue); |
|
|
|
|
|
|
|
this.requestStrByThead = this.adjustRequestMsg; |
|
|
|
|
|
|
|
showResult(); |
|
|
|
} |
|
|
|
} |
|
|
|
private void requestRefundThead() |
|
|
|
private void requestRefundThead() |
|
|
|
{ |
|
|
|
{ |
|
|
|
jsonResultByThead = n5Core.requestRefund(txnIdForRefund, txnAmtTextBoxValue, paymentAppIdComboBoxValue, qrValueTextBoxValue); |
|
|
|
jsonResultByThead = n5Core.requestRefund(txnIdForRefund, txnAmtTextBoxValue, paymentAppIdComboBoxValue, qrValueTextBoxValue, oriTxnDateTextBoxValue, hostRefNoTextBoxValue); |
|
|
|
this.requestStrByThead = this.refundRequestMsg; |
|
|
|
this.requestStrByThead = this.refundRequestMsg; |
|
|
|
showResult(); |
|
|
|
showResult(); |
|
|
|
} |
|
|
|
} |
|
|
|
private void requestRetrievalThead() |
|
|
|
private void requestRetrievalThead() |
|
|
|
{ |
|
|
|
{ |
|
|
|
jsonResultByThead = n5Core.requestRetrieval(ecrTxnIdTextBoxValue, 180000); |
|
|
|
jsonResultByThead = n5Core.requestRetrieval(ecrTxnIdTextBoxValue, 10000); |
|
|
|
this.requestStrByThead = this.retrievalRequestMsg; |
|
|
|
this.requestStrByThead = this.retrievalRequestMsg; |
|
|
|
showResult(); |
|
|
|
showResult(); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -123,17 +159,18 @@ namespace ECR_N5_DLL_TestUI |
|
|
|
{ |
|
|
|
{ |
|
|
|
while (isRepeatSubmit) |
|
|
|
while (isRepeatSubmit) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
/* |
|
|
|
String result = n5Core.requestRetrieval(ecrTxnIdTextBoxValue, 10000); |
|
|
|
String result = n5Core.requestRetrieval(ecrTxnIdTextBoxValue, 10000); |
|
|
|
addRepeatLog("=============================count" + repeatCount + "============================="); |
|
|
|
addRepeatLog("=============================count" + repeatCount + "============================="); |
|
|
|
addRepeatLog("ecrTxnId = " + ecrTxnIdTextBoxValue); |
|
|
|
addRepeatLog("ecrTxnId = " + ecrTxnIdTextBoxValue); |
|
|
|
|
|
|
|
|
|
|
|
RetrievalResult retrievalResult = RetrievalResult.toRetrievalResultFromJsonMsg(result); |
|
|
|
RetrievalResult retrievalResult = RetrievalResult.toRetrievalResultFromJsonMsg(result);*/ |
|
|
|
if (retrievalResult != null && retrievalResult.Status.Equals("00")) |
|
|
|
String result = n5Core.requestSale(getTxnId(), "10", "0", "CC", "", "30000"); |
|
|
|
{ |
|
|
|
addRepeatLog("=============================count" + repeatCount + "============================="); |
|
|
|
addRepeatLog("Retrieval Success!"); |
|
|
|
addRepeatLog("ecrTxnId = " + ecrTxnIdTextBoxValue); |
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
SaleResult saleResult = SaleResult.toSaleResultFromJsonMsg(result); |
|
|
|
addRepeatLog("Retrieval Failed!"); |
|
|
|
addRepeatLog("Sale Result:" + saleResult.Status); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -145,6 +182,7 @@ namespace ECR_N5_DLL_TestUI |
|
|
|
this.requestStrByThead = this.voidRequestMsg; |
|
|
|
this.requestStrByThead = this.voidRequestMsg; |
|
|
|
showResult(); |
|
|
|
showResult(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void requestSettlementThead() |
|
|
|
private void requestSettlementThead() |
|
|
|
{ |
|
|
|
{ |
|
|
|
jsonResultByThead = n5Core.sendSettlementtRequest(); |
|
|
|
jsonResultByThead = n5Core.sendSettlementtRequest(); |
|
|
|
@ -152,6 +190,20 @@ namespace ECR_N5_DLL_TestUI |
|
|
|
showResult(); |
|
|
|
showResult(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void requesGetInfoThead() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
jsonResultByThead = n5Core.requestGetInfo(); |
|
|
|
|
|
|
|
this.requestStrByThead = this.getInfoRequestMsg; |
|
|
|
|
|
|
|
showResult(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void requesCheckUpdateThead() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
jsonResultByThead = n5Core.checkUpdate(); |
|
|
|
|
|
|
|
this.requestStrByThead = this.checkUpdateRequestMsg; |
|
|
|
|
|
|
|
showResult(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void requestLinkRequestThead() |
|
|
|
private void requestLinkRequestThead() |
|
|
|
{ |
|
|
|
{ |
|
|
|
jsonResultByThead = n5Core.sendLinkTestRequest(); |
|
|
|
jsonResultByThead = n5Core.sendLinkTestRequest(); |
|
|
|
@ -228,20 +280,9 @@ namespace ECR_N5_DLL_TestUI |
|
|
|
showResult(); |
|
|
|
showResult(); |
|
|
|
return; |
|
|
|
return; |
|
|
|
}*/ |
|
|
|
}*/ |
|
|
|
if (this.ecrTxnIdTextBox.Text == null || "".Equals(this.ecrTxnIdTextBox.Text.Trim())) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
this.requestStrByThead = "Please input parameter."; |
|
|
|
|
|
|
|
this.jsonResultByThead = "Please input parameter."; |
|
|
|
|
|
|
|
showResult(); |
|
|
|
|
|
|
|
this.ecrTxnIdTextBox.Focus(); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
ecrTxnIdTextBoxValue = ecrTxnIdTextBox.Text; |
|
|
|
ecrTxnIdTextBoxValue = ecrTxnIdTextBox.Text; |
|
|
|
Thread th = new Thread(requestRepeatRetrievalThead); |
|
|
|
Thread th = new Thread(requestRepeatRetrievalThead); |
|
|
|
th.Start(); |
|
|
|
th.Start(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -264,10 +305,10 @@ namespace ECR_N5_DLL_TestUI |
|
|
|
{ |
|
|
|
{ |
|
|
|
n5Core = n5coredll.N5Core.getInstance(); |
|
|
|
n5Core = n5coredll.N5Core.getInstance(); |
|
|
|
int initResult = n5Core.initN5Core(portName, baudRate, dataBits, stopBits, parity, timeOut); |
|
|
|
int initResult = n5Core.initN5Core(portName, baudRate, dataBits, stopBits, parity, timeOut); |
|
|
|
if (initResult == 0) |
|
|
|
//if (initResult == 0) |
|
|
|
{ |
|
|
|
//{ |
|
|
|
n5CoreInitSuccess = true; |
|
|
|
n5CoreInitSuccess = true; |
|
|
|
} |
|
|
|
//} |
|
|
|
} |
|
|
|
} |
|
|
|
if (!n5CoreInitSuccess) |
|
|
|
if (!n5CoreInitSuccess) |
|
|
|
{ |
|
|
|
{ |
|
|
|
@ -347,15 +388,14 @@ namespace ECR_N5_DLL_TestUI |
|
|
|
qrValueTextBoxValue = this.qrValueTextBox.Text; |
|
|
|
qrValueTextBoxValue = this.qrValueTextBox.Text; |
|
|
|
panTextBoxValue = this.panTextBox.Text; |
|
|
|
panTextBoxValue = this.panTextBox.Text; |
|
|
|
expDateTextBoxValue = this.expDateTextBox.Text; |
|
|
|
expDateTextBoxValue = this.expDateTextBox.Text; |
|
|
|
|
|
|
|
txnIdForPreAuth = this.ecrTxnIdTextBox.Text; |
|
|
|
txnIdForSale = this.getTxnId(); |
|
|
|
|
|
|
|
this.requestStrByThead = "Test Function : " + currEventName + "\n txnId = " + txnIdForPreAuth + "\n txnAmt = " + txnAmtTextBoxValue + "\n paymentAppId = " + paymentAppIdComboBoxValue + "\n qrValue = " + qrValueTextBoxValue; |
|
|
|
this.requestStrByThead = "Test Function : " + currEventName + "\n txnId = " + txnIdForPreAuth + "\n txnAmt = " + txnAmtTextBoxValue + "\n paymentAppId = " + paymentAppIdComboBoxValue + "\n qrValue = " + qrValueTextBoxValue; |
|
|
|
showResult(); |
|
|
|
showResult(); |
|
|
|
addLog("txnId = " + txnIdForPreAuth + ", txnAmt = " + txnAmtTextBoxValue + ", paymentAppId = " + paymentAppIdComboBoxValue + ",qrValue = " + qrValueTextBoxValue); |
|
|
|
addLog("txnId = " + txnAmtTextBoxValue + ", txnAmt = " + txnAmtTextBoxValue + ", paymentAppId = " + paymentAppIdComboBoxValue + ",qrValue = " + qrValueTextBoxValue); |
|
|
|
//jsonResultByThead = n5Core.requestSale(this.getTxnId(), txnAmtTextBoxValue, "0", paymentAppIdComboBoxValue, qrValueTextBoxValue); |
|
|
|
//jsonResultByThead = n5Core.requestSale(this.getTxnId(), txnAmtTextBoxValue, "0", paymentAppIdComboBoxValue, qrValueTextBoxValue); |
|
|
|
this.preAuthRequestMsg = this.requestStrByThead; |
|
|
|
this.adjustRequestMsg = this.requestStrByThead; |
|
|
|
|
|
|
|
|
|
|
|
Thread th = new Thread(requestPreauthThead); |
|
|
|
Thread th = new Thread(requestAdjustThead); |
|
|
|
th.Start(); |
|
|
|
th.Start(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -458,6 +498,8 @@ namespace ECR_N5_DLL_TestUI |
|
|
|
txnAmtTextBoxValue = this.txnAmtTextBox.Text; |
|
|
|
txnAmtTextBoxValue = this.txnAmtTextBox.Text; |
|
|
|
paymentAppIdComboBoxValue = this.paymentAppIdComboBox.Text; |
|
|
|
paymentAppIdComboBoxValue = this.paymentAppIdComboBox.Text; |
|
|
|
qrValueTextBoxValue = this.qrValueTextBox.Text; |
|
|
|
qrValueTextBoxValue = this.qrValueTextBox.Text; |
|
|
|
|
|
|
|
oriTxnDateTextBoxValue = this.oriTxnDateTextBox.Text; |
|
|
|
|
|
|
|
hostRefNoTextBoxValue = this.hostRefNoTextBox.Text; |
|
|
|
|
|
|
|
|
|
|
|
txnIdForRefund = this.getTxnId(); |
|
|
|
txnIdForRefund = this.getTxnId(); |
|
|
|
this.requestStrByThead = "Test Function : " + currEventName + "\n txnId = " + txnIdForRefund + "\n txnAmt = " + txnAmtTextBoxValue + "\n paymentAppId = " + paymentAppIdComboBoxValue + "\n qrValue = " + qrValueTextBoxValue; |
|
|
|
this.requestStrByThead = "Test Function : " + currEventName + "\n txnId = " + txnIdForRefund + "\n txnAmt = " + txnAmtTextBoxValue + "\n paymentAppId = " + paymentAppIdComboBoxValue + "\n qrValue = " + qrValueTextBoxValue; |
|
|
|
@ -493,6 +535,27 @@ namespace ECR_N5_DLL_TestUI |
|
|
|
th.Start(); |
|
|
|
th.Start(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else if ("HealthCheck".Equals(this.thisEvent)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
this.requestStrByThead = "Test Function : " + currEventName; |
|
|
|
|
|
|
|
showResult(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//jsonResultByThead = n5Core.requestRetrieval(ecrTxnIdTextBoxValue, 180000); |
|
|
|
|
|
|
|
this.checkHealthRequestMsg = this.requestStrByThead; |
|
|
|
|
|
|
|
Thread th = new Thread(requestCheckHealthThead); |
|
|
|
|
|
|
|
th.Start(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if ("SummaryEnquiry".Equals(this.thisEvent)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
this.requestStrByThead = "Test Function : " + currEventName; |
|
|
|
|
|
|
|
showResult(); |
|
|
|
|
|
|
|
enquiryPeriod = periodTextBox.Text; |
|
|
|
|
|
|
|
//jsonResultByThead = n5Core.requestRetrieval(ecrTxnIdTextBoxValue, 180000); |
|
|
|
|
|
|
|
this.summaryEnquiryRequestMsg = this.requestStrByThead; |
|
|
|
|
|
|
|
Thread th = new Thread(requestSummaryEnquiryThead); |
|
|
|
|
|
|
|
th.Start(); |
|
|
|
|
|
|
|
} |
|
|
|
else if ("Void".Equals(this.thisEvent)) |
|
|
|
else if ("Void".Equals(this.thisEvent)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (this.ecrTxnIdTextBox.Text == null || "".Equals(this.ecrTxnIdTextBox.Text.Trim())) |
|
|
|
if (this.ecrTxnIdTextBox.Text == null || "".Equals(this.ecrTxnIdTextBox.Text.Trim())) |
|
|
|
@ -527,6 +590,59 @@ namespace ECR_N5_DLL_TestUI |
|
|
|
Thread th = new Thread(requestSettlementThead); |
|
|
|
Thread th = new Thread(requestSettlementThead); |
|
|
|
th.Start(); |
|
|
|
th.Start(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else if ("CreateOrder".Equals(this.thisEvent)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (this.txnAmtTextBox.Text == null || "".Equals(this.txnAmtTextBox.Text.Trim())) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
this.requestStrByThead = "Please input parameter."; |
|
|
|
|
|
|
|
this.jsonResultByThead = "Please input parameter."; |
|
|
|
|
|
|
|
showResult(); |
|
|
|
|
|
|
|
this.txnAmtTextBox.Focus(); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if (this.paymentTypeTextBox.Text == null || "".Equals(this.paymentTypeTextBox.Text.Trim())) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
this.requestStrByThead = "Please input parameter."; |
|
|
|
|
|
|
|
this.jsonResultByThead = "Please input parameter."; |
|
|
|
|
|
|
|
showResult(); |
|
|
|
|
|
|
|
this.paymentTypeTextBox.Focus(); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
txnAmtTextBoxValue = this.txnAmtTextBox.Text; |
|
|
|
|
|
|
|
paymentAppIdComboBoxValue = this.paymentAppIdComboBox.Text; |
|
|
|
|
|
|
|
paymentTypeTextBoxValue = this.paymentTypeTextBox.Text; |
|
|
|
|
|
|
|
txnIdForCreateOrder = this.getTxnId(); |
|
|
|
|
|
|
|
this.requestStrByThead = "Test Function : " + currEventName; |
|
|
|
|
|
|
|
showResult(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//jsonResultByThead = n5Core.sendSettlementtRequest(); |
|
|
|
|
|
|
|
this.createOrderRequestMsg = this.requestStrByThead; |
|
|
|
|
|
|
|
Thread th = new Thread(requestCreateOrderThread); |
|
|
|
|
|
|
|
th.Start(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if ("GetInfo".Equals(this.thisEvent)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
this.requestStrByThead = "Test Function : " + currEventName; |
|
|
|
|
|
|
|
showResult(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//jsonResultByThead = n5Core.sendSettlementtRequest(); |
|
|
|
|
|
|
|
this.getInfoRequestMsg = this.requestStrByThead; |
|
|
|
|
|
|
|
Thread th = new Thread(requesGetInfoThead); |
|
|
|
|
|
|
|
th.Start(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if ("CheckUpdate".Equals(this.thisEvent)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
this.requestStrByThead = "Test Function : " + currEventName; |
|
|
|
|
|
|
|
showResult(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//jsonResultByThead = n5Core.sendSettlementtRequest(); |
|
|
|
|
|
|
|
this.checkUpdateRequestMsg = this.requestStrByThead; |
|
|
|
|
|
|
|
Thread th = new Thread(requesCheckUpdateThead); |
|
|
|
|
|
|
|
th.Start(); |
|
|
|
|
|
|
|
} |
|
|
|
else if ("Link Request".Equals(this.thisEvent)) |
|
|
|
else if ("Link Request".Equals(this.thisEvent)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
this.requestStrByThead = "Test Function : " + currEventName; |
|
|
|
this.requestStrByThead = "Test Function : " + currEventName; |
|
|
|
@ -667,6 +783,25 @@ namespace ECR_N5_DLL_TestUI |
|
|
|
this.batchIdTextBox.IsEnabled = false; |
|
|
|
this.batchIdTextBox.IsEnabled = false; |
|
|
|
this.settleDateTextBox.IsEnabled = false; |
|
|
|
this.settleDateTextBox.IsEnabled = false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else if ("CreateOrder".Equals(this.thisEvent)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
this.ecrTxnIdTextBox.Text = ""; |
|
|
|
|
|
|
|
this.txnAmtTextBox.IsEnabled = true; |
|
|
|
|
|
|
|
this.paymentTypeTextBox.IsEnabled = true; |
|
|
|
|
|
|
|
if (this.paymentAppIdComboBox.Text == null || "".Equals(this.paymentAppIdComboBox.Text)) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
this.paymentAppIdComboBox.Text = "CC"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.batchIdTextBox.Text = ""; |
|
|
|
|
|
|
|
this.settleDateTextBox.Text = ""; |
|
|
|
|
|
|
|
this.paymentAppIdComboBox.IsEnabled = true; |
|
|
|
|
|
|
|
this.qrValueTextBox.IsEnabled = true; |
|
|
|
|
|
|
|
this.panTextBox.IsEnabled = true; |
|
|
|
|
|
|
|
this.expDateTextBox.IsEnabled = true; |
|
|
|
|
|
|
|
this.ecrTxnIdTextBox.IsEnabled = false; |
|
|
|
|
|
|
|
this.batchIdTextBox.IsEnabled = false; |
|
|
|
|
|
|
|
this.settleDateTextBox.IsEnabled = false; |
|
|
|
|
|
|
|
} |
|
|
|
else if("PreAuth".Equals(this.thisEvent)) |
|
|
|
else if("PreAuth".Equals(this.thisEvent)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
this.ecrTxnIdTextBox.Text = ""; |
|
|
|
this.ecrTxnIdTextBox.Text = ""; |
|
|
|
@ -713,7 +848,7 @@ namespace ECR_N5_DLL_TestUI |
|
|
|
this.batchIdTextBox.Text = ""; |
|
|
|
this.batchIdTextBox.Text = ""; |
|
|
|
this.settleDateTextBox.Text = ""; |
|
|
|
this.settleDateTextBox.Text = ""; |
|
|
|
this.paymentAppIdComboBox.IsEnabled = true; |
|
|
|
this.paymentAppIdComboBox.IsEnabled = true; |
|
|
|
this.ecrTxnIdTextBox.IsEnabled = false; |
|
|
|
this.ecrTxnIdTextBox.IsEnabled = true; |
|
|
|
this.batchIdTextBox.IsEnabled = false; |
|
|
|
this.batchIdTextBox.IsEnabled = false; |
|
|
|
this.settleDateTextBox.IsEnabled = false; |
|
|
|
this.settleDateTextBox.IsEnabled = false; |
|
|
|
} |
|
|
|
} |
|
|
|
|