Add HEALTHCHECK

master
rexlin 5 years ago
parent 25f22a0241
commit 169faace5f
  1. 109
      ECR_N5_DLL_TestUI/MainWindow.xaml
  2. 213
      ECR_N5_DLL_TestUI/MainWindow.xaml.cs
  3. 321
      n5coredll/InstllResult.cs
  4. 72
      n5coredll/LogUtil.cs
  5. 879
      n5coredll/N5Core.cs
  6. 6
      n5coredll/RefundResult.cs
  7. 25
      n5coredll/RequestResult.cs
  8. BIN
      n5coredll/dll/IbmsSerialPort.dll
  9. BIN
      n5coredll/dll/IbmsSerialPort.lib
  10. 5
      n5coredll/n5coredll.csproj

@ -14,24 +14,24 @@
<RowDefinition Height="2*"/>
<RowDefinition Height="5*"/>
</Grid.RowDefinitions>
<Border BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Left" Height="331" Margin="46,445,0,0" VerticalAlignment="Top" Width="702" Grid.RowSpan="2" />
<TextBox x:Name="result1TextBox" HorizontalAlignment="Left" Height="258" Margin="406,485,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="330"/>
<Label Content="ECR N5 TEST" HorizontalAlignment="Left" Margin="248,-1,0,0" VerticalAlignment="Top" Width="304" Height="75" FontSize="48"/>
<RadioButton Content="Refund" HorizontalAlignment="Left" Margin="264,77,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="Retrieval" HorizontalAlignment="Left" Margin="409,77,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="Sale" HorizontalAlignment="Left" Margin="26,77,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="Void" HorizontalAlignment="Left" Margin="145,77,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<Label Content="Please select test function:" HorizontalAlignment="Left" Margin="46,49,0,0" VerticalAlignment="Top" FontSize="16"/>
<Label Content="Please input test data:" HorizontalAlignment="Left" Margin="46,174,0,0" VerticalAlignment="Top" FontSize="16"/>
<Label Content="Payment Application : " HorizontalAlignment="Left" Margin="434,204,0,0" VerticalAlignment="Top"/>
<Label Content="Transaction Amount : " HorizontalAlignment="Left" Margin="61,208,0,0" VerticalAlignment="Top" Width="140"/>
<TextBox x:Name="txnAmtTextBox" HorizontalAlignment="Left" Height="23" Margin="201,208,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="205"/>
<Label Content="QR Code Value : " HorizontalAlignment="Left" Margin="61,234,0,0" VerticalAlignment="Top" Width="114"/>
<TextBox x:Name="qrValueTextBox" HorizontalAlignment="Left" Height="23" Margin="201,234,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="543"/>
<Button x:Name="submit_1_Button" Content="Submit" HorizontalAlignment="Left" Margin="494,405,0,0" VerticalAlignment="Top" Width="104" Click="Submit_1_Button_Click" Height="27"/>
<Label Content="response:" HorizontalAlignment="Left" Margin="402,455,0,0" VerticalAlignment="Top"/>
<Border BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Left" Height="295" Margin="46,495,0,0" VerticalAlignment="Top" Width="702" Grid.RowSpan="2" />
<TextBox x:Name="result1TextBox" HorizontalAlignment="Left" Height="237" Margin="406,520,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="330"/>
<Label Content="ECR N5 TEST" HorizontalAlignment="Left" Margin="248,-1,0,0" VerticalAlignment="Top" Width="304" Height="45" FontSize="36"/>
<RadioButton Content="Refund" HorizontalAlignment="Left" Margin="264,73,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="Retrieval" HorizontalAlignment="Left" Margin="409,73,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="Sale" HorizontalAlignment="Left" Margin="26,73,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="Void" HorizontalAlignment="Left" Margin="145,73,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<Label Content="Please select test function:" HorizontalAlignment="Left" Margin="46,45,0,0" VerticalAlignment="Top" FontSize="16"/>
<Label Content="Please input test data:" HorizontalAlignment="Left" Margin="26,161,0,0" VerticalAlignment="Top" FontSize="16"/>
<Label Content="Payment Application : " HorizontalAlignment="Left" Margin="434,183,0,0" VerticalAlignment="Top"/>
<Label Content="Transaction Amount : " HorizontalAlignment="Left" Margin="61,187,0,0" VerticalAlignment="Top" Width="140"/>
<TextBox x:Name="txnAmtTextBox" HorizontalAlignment="Left" Height="23" Margin="201,187,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="205"/>
<Label Content="QR Code Value : " HorizontalAlignment="Left" Margin="61,213,0,0" VerticalAlignment="Top" Width="114"/>
<TextBox x:Name="qrValueTextBox" HorizontalAlignment="Left" Height="23" Margin="201,213,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="543"/>
<Button x:Name="submit_1_Button" Content="Submit" HorizontalAlignment="Left" Margin="467,472,0,0" VerticalAlignment="Top" Width="69" Click="Submit_1_Button_Click" Height="21"/>
<Label Content="response:" HorizontalAlignment="Left" Margin="408,495,0,0" VerticalAlignment="Top"/>
<ComboBox x:Name="paymentAppIdComboBox" SelectedIndex="0" HorizontalAlignment="Left" Margin="578,208,0,0" VerticalAlignment="Top" Width="164" >
<ComboBox x:Name="paymentAppIdComboBox" SelectedIndex="0" HorizontalAlignment="Left" Margin="578,187,0,0" VerticalAlignment="Top" Width="164" >
<ComboBoxItem Content="CC"/>
<ComboBoxItem Content="QRC"/>
<ComboBoxItem Content="CPN"/>
@ -43,13 +43,13 @@
<ComboBoxItem Content="EPS"/>
<ComboBoxItem Content="NONE"/>
</ComboBox>
<Label Content="Transaction Id : " HorizontalAlignment="Left" Margin="61,261,0,0" VerticalAlignment="Top"/>
<TextBox x:Name="ecrTxnIdTextBox" HorizontalAlignment="Left" Height="23" Margin="201,261,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="543"/>
<RadioButton Content="Settlement" HorizontalAlignment="Left" Margin="26,106,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="Reprint" HorizontalAlignment="Left" Margin="145,106,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="Link Request" HorizontalAlignment="Left" Margin="264,106,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<Label Content="portName : " HorizontalAlignment="Left" Margin="59,405,0,0" VerticalAlignment="Top"/>
<ComboBox x:Name="portNameComboBox" SelectedIndex="2" HorizontalAlignment="Left" Margin="145,409,0,0" VerticalAlignment="Top" Width="205" SelectionChanged="PortNameComboBox_SelectionChanged">
<Label Content="Transaction Id : " HorizontalAlignment="Left" Margin="61,240,0,0" VerticalAlignment="Top"/>
<TextBox x:Name="ecrTxnIdTextBox" HorizontalAlignment="Left" Height="23" Margin="201,240,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="543"/>
<RadioButton Content="Settlement" HorizontalAlignment="Left" Margin="26,102,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="Reprint" HorizontalAlignment="Left" Margin="145,102,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="Link Request" HorizontalAlignment="Left" Margin="264,102,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<Label Content="portName : " HorizontalAlignment="Left" Margin="59,468,0,0" VerticalAlignment="Top"/>
<ComboBox x:Name="portNameComboBox" SelectedIndex="2" HorizontalAlignment="Left" Margin="145,472,0,0" VerticalAlignment="Top" Width="205" SelectionChanged="PortNameComboBox_SelectionChanged">
<ComboBoxItem Content="COM1"/>
<ComboBoxItem Content="COM2"/>
<ComboBoxItem Content="COM3"/>
@ -71,30 +71,43 @@
<ComboBoxItem Content="COM19"/>
<ComboBoxItem Content="COM20"/>
</ComboBox>
<TextBox x:Name="requestTextBox" HorizontalAlignment="Left" Height="258" Margin="58,487,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="330"/>
<Label Content="request:" HorizontalAlignment="Left" Margin="48,455,0,0" VerticalAlignment="Top"/>
<TextBox x:Name="logPathTextBox" HorizontalAlignment="Left" Height="23" Margin="48,29.667,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="680" Grid.Row="1"/>
<Button x:Name="reset_Button" Content="Reset" HorizontalAlignment="Left" Margin="375,405,0,0" VerticalAlignment="Top" Width="101" Click="Reset_Button_Click" Height="27"/>
<RadioButton Content="Terminaion" HorizontalAlignment="Left" Margin="409,106,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="Scan" HorizontalAlignment="Left" Margin="528,106,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="ReadCard" HorizontalAlignment="Left" Margin="528,77,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="AddPoint" HorizontalAlignment="Left" Margin="647,77,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<Label Content="Pan : " HorizontalAlignment="Left" Margin="61,290,0,0" VerticalAlignment="Top" Width="114"/>
<TextBox x:Name="panTextBox" HorizontalAlignment="Left" Height="23" Margin="201,290,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="543"/>
<Label Content="Exp Date : " HorizontalAlignment="Left" Margin="61,317,0,0" VerticalAlignment="Top"/>
<TextBox x:Name="expDateTextBox" HorizontalAlignment="Left" Height="23" Margin="201,317,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="543"/>
<RadioButton Content="PreAuth" HorizontalAlignment="Left" Margin="647,105,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="Offline" HorizontalAlignment="Left" Margin="26,137,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="Adjust" HorizontalAlignment="Left" Margin="145,137,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="BatchEnquiry" HorizontalAlignment="Left" Margin="264,137,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="SettleEnquiry" HorizontalAlignment="Left" Margin="408,137,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<Label Content="Authcode" HorizontalAlignment="Left" Margin="61,345,0,0" VerticalAlignment="Top"/>
<TextBox x:Name="authCodeTextBox" Height="23" Margin="201,345,40.667,0" TextWrapping="Wrap" VerticalAlignment="Top"/>
<Label Content="SettleDate" HorizontalAlignment="Left" Margin="489,375,0,0" VerticalAlignment="Top"/>
<TextBox x:Name="settleDateTextBox" Height="23" Margin="578,375,41,0" TextWrapping="Wrap" VerticalAlignment="Top"/>
<Label Content="BatchId" HorizontalAlignment="Left" Margin="63,375,0,0" VerticalAlignment="Top"/>
<TextBox x:Name="batchIdTextBox" Height="23" Margin="201,375,341,0" TextWrapping="Wrap" VerticalAlignment="Top"/>
<Button x:Name="submit_repeat_Button" Content="Start Repeat" Margin="616,405,65,0" VerticalAlignment="Top" Click="Submit_Repeat_Button_Click" Height="27"/>
<TextBox x:Name="requestTextBox" HorizontalAlignment="Left" Height="239" Margin="58,520,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="330"/>
<Label Content="request:" HorizontalAlignment="Left" Margin="59,495,0,0" VerticalAlignment="Top"/>
<TextBox x:Name="logPathTextBox" HorizontalAlignment="Left" Height="23" Margin="48,44,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="680" Grid.Row="1"/>
<Button x:Name="reset_Button" Content="Reset" HorizontalAlignment="Left" Margin="382,472,0,0" VerticalAlignment="Top" Width="69" Click="Reset_Button_Click" Height="21"/>
<RadioButton Content="Terminaion" HorizontalAlignment="Left" Margin="409,102,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="Scan" HorizontalAlignment="Left" Margin="528,102,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="ReadCard" HorizontalAlignment="Left" Margin="528,73,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="AddPoint" HorizontalAlignment="Left" Margin="647,73,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<Label Content="Pan : " HorizontalAlignment="Left" Margin="61,269,0,0" VerticalAlignment="Top" Width="114"/>
<TextBox x:Name="panTextBox" HorizontalAlignment="Left" Height="23" Margin="201,269,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="543"/>
<Label Content="Exp Date : " HorizontalAlignment="Left" Margin="61,296,0,0" VerticalAlignment="Top"/>
<TextBox x:Name="expDateTextBox" HorizontalAlignment="Left" Height="23" Margin="201,296,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="543"/>
<RadioButton Content="PreAuth" HorizontalAlignment="Left" Margin="647,101,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="Offline" HorizontalAlignment="Left" Margin="26,133,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="Adjust" HorizontalAlignment="Left" Margin="145,133,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="BatchEnquiry" HorizontalAlignment="Left" Margin="264,133,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="SettleEnquiry" HorizontalAlignment="Left" Margin="408,133,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<Label Content="Authcode" HorizontalAlignment="Left" Margin="61,380,0,0" VerticalAlignment="Top"/>
<TextBox x:Name="authCodeTextBox" Height="23" Margin="201,380,41,0" TextWrapping="Wrap" VerticalAlignment="Top"/>
<Label Content="SettleDate" HorizontalAlignment="Left" Margin="489,410,0,0" VerticalAlignment="Top"/>
<TextBox x:Name="settleDateTextBox" Height="23" Margin="578,410,41,0" TextWrapping="Wrap" VerticalAlignment="Top"/>
<Label Content="BatchId" HorizontalAlignment="Left" Margin="63,410,0,0" VerticalAlignment="Top"/>
<TextBox x:Name="batchIdTextBox" Height="23" Margin="201,410,341,0" TextWrapping="Wrap" VerticalAlignment="Top"/>
<Button x:Name="submit_repeat_Button" Content="Start Repeat" Margin="556,472,147,0" VerticalAlignment="Top" Click="Submit_Repeat_Button_Click" Height="21"/>
<Label Content="HostRefNo" HorizontalAlignment="Left" Margin="489,437,0,0" VerticalAlignment="Top"/>
<TextBox x:Name="hostRefNoTextBox" Height="23" Margin="578,437,41,0" TextWrapping="Wrap" VerticalAlignment="Top"/>
<Label Content="OriTxnDate" HorizontalAlignment="Left" Margin="63,437,0,0" VerticalAlignment="Top" Width="75"/>
<TextBox x:Name="oriTxnDateTextBox" Height="23" Margin="201,437,341,0" TextWrapping="Wrap" VerticalAlignment="Top"/>
<RadioButton Content="GetInfo" HorizontalAlignment="Left" Margin="528,133,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="CreateOrder" HorizontalAlignment="Left" Margin="647,133,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<Label Content="Payment Type:" HorizontalAlignment="Left" Margin="61,324,0,0" VerticalAlignment="Top"/>
<TextBox x:Name="paymentTypeTextBox" HorizontalAlignment="Left" Height="23" Margin="201,324,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="543"/>
<RadioButton Content="CheckUpdate" HorizontalAlignment="Left" Margin="264,164,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="HealthCheck" HorizontalAlignment="Left" Margin="409,164,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<RadioButton Content="SummaryEnquiry" HorizontalAlignment="Left" Margin="529,164,0,0" VerticalAlignment="Top" FontSize="14" Checked="RadioButton_Checked"/>
<Label Content="Enquiry Period:" HorizontalAlignment="Left" Margin="61,352,0,0" VerticalAlignment="Top"/>
<TextBox x:Name="periodTextBox" HorizontalAlignment="Left" Height="23" Margin="201,352,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="543"/>
</Grid>
</ScrollViewer>

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

@ -0,0 +1,321 @@
using System;
using System.Text;
namespace n5coredll
{
public class InstllResult {
private static string TXN_ID = "TXN_ID";
private static string STATUS = "STATUS";
private static string TXN_AMT = "TXN_AMT";
private static string PAYMENT_TYPE = "PAYMENT_TYPE";
private static string RESP_CODE = "RESP_CODE";
private static string TRACE_NO = "TRACE_NO";
private static string TXN_DATE = "TXN_DATE";
private static string TXN_TIME = "TXN_TIME";
private static string HOST_REF = "HOST_REF";
private static string AUTH_CODE = "AUTH_CODE";
private static string MID = "MID";
private static string TID = "TID";
private static string PAN = "PAN";
private static string EXPIRY_DATE = "EXPIRY_DATE";
private static string AID = "AID";
private static string ENTRY_MODE = "ENTRY_MODE";
private static string BATCH_NO = "BATCH_NO";
private static string TC = "TC";
private static string APP = "APP";
private static string ACQUIRER = "ACQUIRER";
private string ecrRefTxnId;
private string status;
private decimal txnAmt;
private PaymentType paymentType;
private string respCode;
private string traceNo;
private string txnDate;
private string txnTime;
private string hostRef;
private string couponId;
private string authCode;
private string mid;
private string tid;
private string pan;
private string expiryDate;
private string aid;
private string entryMode;
private string batchNo;
private string tc;
private string app;
private string acquirer;
private void setEcrRefTxnId(string pEcrRefTxnId) {
ecrRefTxnId = pEcrRefTxnId;
}
public string EcrRefTxnId {
get { return ecrRefTxnId; }
}
public string Status {
get { return status; }
}
private void setStatus(string pStatus) {
this.status = pStatus;
}
public decimal TxnAmt {
get { return txnAmt; }
}
private void setTxnAmt(decimal pTxnAmt) {
this.txnAmt = pTxnAmt;
}
public PaymentType PaymentType {
get { return paymentType; }
}
private void setPaymentType(PaymentType pPaymentType) {
this.paymentType = pPaymentType;
}
public string RespCode {
get { return respCode; }
}
private void setRespCode(string pRespCode) {
this.respCode = pRespCode;
}
public string TraceNo {
get { return traceNo; }
}
private void setTraceNo(string pTraceNo) {
this.traceNo = pTraceNo;
}
public string TxnDate {
get { return txnDate; }
}
private void setTxnDate(string pTxnDate) {
this.txnDate = pTxnDate;
}
public string TxnTime {
get { return txnTime; }
}
private void setTxnTime(string pTxnTime) {
this.txnTime = pTxnTime;
}
public string HostRef {
get { return hostRef; }
}
private void setHostRef(string pHostRef) {
this.hostRef = pHostRef;
}
public string CouponId {
get { return couponId; }
}
private void setCouponId(string pCouponId) {
this.couponId = pCouponId;
}
public string AuthCode {
get { return authCode; }
}
private void setAuthCode(string pAuthCode) {
this.authCode = pAuthCode;
}
public string Mid {
get { return mid; }
}
private void setMid(string pMid) {
this.mid = pMid;
}
public string Tid {
get { return tid; }
}
private void setTid(string pTid) {
this.tid = pTid;
}
public string Pan {
get { return pan; }
}
private void setPan(string pPan) {
this.pan = pPan;
}
public string ExpiryDate {
get { return expiryDate; }
}
private void setExpiryDate(string pExpiryDate) {
this.expiryDate = pExpiryDate;
}
public string Aid {
get { return aid; }
}
private void setAid(string pAid) {
this.aid = pAid;
}
public string EntryMode {
get { return entryMode; }
}
private void setEntryMode(string pEntryMode) {
this.entryMode = pEntryMode;
}
public string BatchNo {
get { return batchNo; }
}
private void setBatchNo(string pBatchNo) {
this.batchNo = pBatchNo;
}
public string Tc {
get { return tc; }
}
private void setTc(string pTc) {
this.tc = pTc;
}
public string App {
get { return app; }
}
private void setApp(string pApp) {
this.app = pApp;
}
public string Acquirer {
get { return acquirer; }
}
private void setAcquirer(string pAcquirer) {
this.acquirer = pAcquirer;
}
private static string curTxnId;
public static string getCurTxnId()
{
return curTxnId;
}
public static string toJsonForInstl(string thisTxnId, decimal txnAmt, string tender, PaymentApp appId, string qrcValue) {
if (thisTxnId == null || "".Equals(thisTxnId)) {
Console.WriteLine("getTxnId is null ");
return null;
}
string instlMsg;
if (tender == null || tender.Equals(string.Empty))
instlMsg = "{\"EVENT_NAME\":\"INSTL\",\"PAYMENT_APP_ID\":\"" + ObjectUtil.getPaymentAppValue(appId) + "\",\"TXN_ID\":\"" + thisTxnId + "\",\"QRC_VALUE\":\"" + qrcValue + "\",\"TXN_AMT\":" + txnAmt.ToString() + "}";
else
instlMsg = "{\"EVENT_NAME\":\"INSTL\",\"PAYMENT_APP_ID\":\"" + ObjectUtil.getPaymentAppValue(appId) + "\",\"TENDER\":\"" + tender + "\",\"TXN_ID\":\"" + thisTxnId + "\",\"QRC_VALUE\":\"" + qrcValue + "\",\"TXN_AMT\":" + txnAmt.ToString() + "}";
return instlMsg;
}
private static string getTxnId() {
StringBuilder txnIdSb = new StringBuilder();
DateTime dt = DateTime.Now;
txnIdSb.Append(dt.ToString("yyyyMMddHHmmssfff"));
Console.WriteLine("txnIdSb = " + txnIdSb.ToString());
int randomTime = 0;
if (dt.Ticks.ToString().Length > 8) {
Console.WriteLine("Ticks.Length > 8 = " + dt.Ticks.ToString());
randomTime = int.Parse(dt.Ticks.ToString().Substring(0, 8));
}
else {
randomTime = int.Parse(dt.Ticks.ToString());
}
if (randomTime > 0) {
Random random = new Random(randomTime);
for (int i = 0; i < 15; i++) {
int thidRandom = random.Next(10);
txnIdSb.Append(thidRandom);
}
Console.WriteLine("txnIdSb.ToString = " + txnIdSb.ToString());
return txnIdSb.ToString();
}
else {
Console.WriteLine("randomTime is error = " + randomTime);
}
return "";
}
public static InstllResult toInstllResultFromJsonMsg(string jsonMsg) {
if (jsonMsg == null || !jsonMsg.StartsWith("{") || !jsonMsg.EndsWith("}")) {
return null;
}
int jsonLength = jsonMsg.Length;
jsonMsg = jsonMsg.Substring(0, jsonLength - 1);
jsonMsg = jsonMsg.Substring(1, jsonLength - 2);
string[] column = jsonMsg.Split(',');
string[] valueColumn = null;
string valueColumn0 = null;
string valueColumn1 = null;
InstllResult result = new InstllResult();
for (int i = 0; i < column.Length; i++) {
valueColumn = column[i].Split(':');
valueColumn0 = valueColumn[0].Replace('"', ' ').Trim();
valueColumn1 = valueColumn[1].Replace('"', ' ').Trim();
if (InstllResult.TXN_ID.Equals(valueColumn0)) {
result.setEcrRefTxnId(valueColumn1);
}
if (InstllResult.STATUS.Equals(valueColumn0)) {
result.setStatus(valueColumn1);
}
if (InstllResult.TXN_AMT.Equals(valueColumn0)) {
if (valueColumn1 == null || "".Equals(valueColumn1)) {
result.setTxnAmt(decimal.Parse("0.00", System.Globalization.NumberStyles.AllowDecimalPoint));
}
else {
result.setTxnAmt(decimal.Parse(valueColumn1));
}
}
if (InstllResult.PAYMENT_TYPE.Equals(valueColumn0)) {
result.setPaymentType(ObjectUtil.getPaymentType(valueColumn1));
}
if (InstllResult.RESP_CODE.Equals(valueColumn0)) {
result.setRespCode(valueColumn1);
}
if (InstllResult.TRACE_NO.Equals(valueColumn0)) {
result.setTraceNo(valueColumn1);
}
if (InstllResult.TXN_DATE.Equals(valueColumn0)) {
result.setTxnDate(valueColumn1);
}
if (InstllResult.TXN_TIME.Equals(valueColumn0)) {
result.setTxnTime(valueColumn1);
}
if (InstllResult.HOST_REF.Equals(valueColumn0)) {
result.setHostRef(valueColumn1);
}
if (InstllResult.AUTH_CODE.Equals(valueColumn0)) {
result.setAuthCode(valueColumn1);
}
if (InstllResult.MID.Equals(valueColumn0)) {
result.setMid(valueColumn1);
}
if (InstllResult.TID.Equals(valueColumn0)) {
result.setTid(valueColumn1);
}
if (InstllResult.PAN.Equals(valueColumn0)) {
result.setPan(valueColumn1);
}
if (InstllResult.EXPIRY_DATE.Equals(valueColumn0)) {
result.setExpiryDate(valueColumn1);
}
if (InstllResult.AID.Equals(valueColumn0)) {
result.setAid(valueColumn1);
}
if (InstllResult.ENTRY_MODE.Equals(valueColumn0)) {
result.setEntryMode(valueColumn1);
}
if (InstllResult.BATCH_NO.Equals(valueColumn0)) {
result.setBatchNo(valueColumn1);
}
if (InstllResult.APP.Equals(valueColumn0)) {
result.setApp(valueColumn1);
}
if (InstllResult.TC.Equals(valueColumn0)) {
result.setTc(valueColumn1);
}
if (InstllResult.ACQUIRER.Equals(valueColumn0)) {
result.setAcquirer(valueColumn1);
}
}
return result;
}
}
}

@ -1,72 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace n5coredll
{
public class LogUtil
{
private static String mLogPath;
private static LogUtil mInstance;
public static LogUtil getInstance()
{
if (mInstance == null)
mInstance = new LogUtil();
return mInstance;
}
public void setLogPath(String logPath)
{
if (logPath.EndsWith(@"\"))
mLogPath = logPath;
else
mLogPath = logPath + @"\";
}
private String getCurLogFile()
{
StringBuilder txnIdSb = new StringBuilder();
DateTime dt = DateTime.Now;
return ("n5dll" + "_" + dt.ToString("yyyyMMdd") +".log");
}
public void addRepeatLog(string logInfo)
{
try
{
String path = mLogPath + getCurLogFile();
//path = @"C:\Users\rexli\AppData\Local\Temp\test.log";
if (!File.Exists(path))
{
using (StreamWriter sw = File.CreateText(path))
{
sw.WriteLine(DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss:ffff") + " [LOGGER] " + logInfo);
sw.Flush();
sw.Close();
}
}
else
{
using (StreamWriter sw = File.AppendText(path))
{
sw.WriteLine(DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss:ffff") + " [LOGGER] " + logInfo);
sw.Flush();
sw.Close();
}
}
// Console.WriteLine(logInfo);
}
catch (Exception err)
{
Console.WriteLine("Exception = " + err);
}
}
}
}

File diff suppressed because it is too large Load Diff

@ -237,6 +237,12 @@ namespace n5coredll
return cardRefundMsg;
}
public static string toJsonForRefund(string txnIId, decimal txnAmt, PaymentApp appId, string qrcValue, string txnDate, string hostRefNo)
{
string cardRefundMsg = "{\"EVENT_NAME\":\"REFUND\",\"PAYMENT_APP_ID\":\"" + ObjectUtil.getPaymentAppValue(appId) + "\",\"TXN_ID\":\"" + txnIId + "\",\"QRC_VALUE\":\"" + qrcValue + "\",\"TXN_AMT\":" + txnAmt.ToString() + ",\"TXN_DATE\":\"" + txnDate + "\",\"HOST_REF\":\"" + hostRefNo + "\"}";
return cardRefundMsg;
}
private static string getTxnId() {
StringBuilder txnIdSb = new StringBuilder();
DateTime dt = DateTime.Now;

@ -30,6 +30,18 @@ namespace n5coredll
return "{\"EVENT_NAME\":\"SETTLE\"}";
}
public static string toJsonGetInfo()
{
// return "{\"EVENT_NAME\":\"GET_INFO\"}";
return "{\"EVENT_NAME\":\"GETDEVICEINFO\",\"PAYMENT_APP_ID\":\"CC\"}";
}
public static string toCheckUpdate()
{
// return "{\"EVENT_NAME\":\"GET_INFO\"}";
return "{\"EVENT_NAME\":\"CHECKUPDATE\"}";
}
public static string toJsonParam()
{
return "{\"EVENT_NAME\":\"PARAM\",\"PAYMENT_APP_ID\":\"CC\"}";
@ -61,6 +73,13 @@ namespace n5coredll
return cardSaleMsg;
}
public static string toJsonForCreateOrder(string inputTxnId, decimal txnAmt, string paymentType)
{
string cardSaleMsg = "{\"EVENT_NAME\":\"CREATE_ORDER\",\"TXN_ID\":\"" + inputTxnId + "\",\"TXN_AMT\":" + txnAmt + ",\"PAYMENT_TYPE\":\"" +paymentType + "\",\"PAYMENT_APP_ID\":\"QRC\"}";
return cardSaleMsg;
}
public static string toJsonForBatchEnquiry(string settleDate)
{
return "{\"EVENT_NAME\":\"BATCH_ENQUIRY\",\"SETTLE_DATE\":\"" + settleDate + "\"}";
@ -75,6 +94,12 @@ namespace n5coredll
{
return "{\"EVENT_NAME\":\"SUMMARY_ENQUIRY\",\"TXN_DATE_START_TO_END\":\"" + period + "\"}";
}
public static string toJsonHealthCheck()
{
return "{\"EVENT_NAME\":\"HEALTH_CHECK\"}";
}
public static RequestResult toReqResultFromJsonMsg(string jsonMsg) {
if (jsonMsg == null || !jsonMsg.StartsWith("{") || !jsonMsg.EndsWith("}")) {
return null;

Binary file not shown.

Binary file not shown.

@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>n5coredll</RootNamespace>
<AssemblyName>n5coredll</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
@ -23,6 +23,7 @@
<WarningLevel>4</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
<RegisterForComInterop>true</RegisterForComInterop>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -49,7 +50,6 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="LogUtil.cs" />
<Compile Include="LoyaltyType.cs" />
<Compile Include="N5Core.cs" />
<Compile Include="N5PropertyOper.cs" />
@ -62,6 +62,7 @@
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<Compile Include="InstllResult.cs" />
<Compile Include="RefundResult.cs" />
<Compile Include="RequestResult.cs" />
<Compile Include="RetrievalResult.cs" />

Loading…
Cancel
Save