Skip to content

Commit

Permalink
Release 1.4.0.0 (2018-05-07)
Browse files Browse the repository at this point in the history
* Added IDialogUIHandler for easier custom POS dialogs.
* Updated TestPOS to handle changing Merchant Number
* Added a check for SimpleDemoAsync sending Basket Data
* EFTRequests now have a matching EFTResponse, constructors and booleans added to match
  • Loading branch information
Samuel Coianiz committed May 6, 2018
1 parent d381ed0 commit bf639f2
Show file tree
Hide file tree
Showing 48 changed files with 4,586 additions and 3,674 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -287,3 +287,6 @@ __pycache__/
*.odx.cs
*.xsd.cs
*.bak
/IPInterface/IPInterface.nuspec
/IPInterface/pc-eftpos.cer
/IPInterface/PCEFTPOS.EFTClient.IPInterface.snk
5 changes: 3 additions & 2 deletions IPInterface.SimpleDemoAsync/MainWindow.xaml
Expand Up @@ -65,7 +65,7 @@

<Grid x:Name="ParentGrid" Margin="5">

<Grid x:Name="SettingsGrid" Visibility="Visible">
<Grid x:Name="SettingsGrid" Visibility="Collapsed">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
Expand Down Expand Up @@ -143,7 +143,7 @@

</Grid>

<Grid x:Name="MainGrid" Visibility="Collapsed">
<Grid x:Name="MainGrid" Visibility="Visible">
<Grid HorizontalAlignment="Stretch">

<Grid.ColumnDefinitions>
Expand Down Expand Up @@ -188,6 +188,7 @@
<!--Amount-->
<TextBlock Text="Amount" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" Padding="0,0,20,0"/>
<TextBox x:Name="txtAmount" Grid.Row="2" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Center" Text="1.00"/>
<CheckBox x:Name="chkBasketData" Content="Send Basket Data" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="2" Grid.Row="3"/>
</Grid>

<!--MainGrid-Footer-->
Expand Down
51 changes: 28 additions & 23 deletions IPInterface.SimpleDemoAsync/MainWindow.xaml.cs
Expand Up @@ -260,28 +260,29 @@ async void BtnTender_Click(object sender, RoutedEventArgs e)
}
}
};

if(!await _eft.WriteRequestAsync(new EFTBasketDataRequest() { Command = new EFTBasketDataCommandCreate() { Basket = basket } }))
{
ShowNotification("FAILED TO SEND TXN", "", "", NotificationType.Error, true);
}
else
{
try
{
await _eft.ReadResponseAsync<EFTBasketDataResponse>(new CancellationTokenSource(new TimeSpan(0, 0, 10)).Token);
}
catch (TaskCanceledException)
{
// EFT-Client timeout waiting for response
ShowNotification("EFT-CLIENT TIMEOUT", null, null, NotificationType.Error, true);
}
catch (Exception)
{
// TODO: Handle failed EFTBasketDataRequest. Should still continue and attempt the transaction.
}
}

if (chkBasketData.IsChecked == true)
{
if (!await _eft.WriteRequestAsync(new EFTBasketDataRequest() { Command = new EFTBasketDataCommandCreate() { Basket = basket } }))
{
ShowNotification("FAILED TO SEND TXN", "", "", NotificationType.Error, true);
}
else
{
try
{
await _eft.ReadResponseAsync<EFTBasketDataResponse>(new CancellationTokenSource(new TimeSpan(0, 0, 10)).Token);
}
catch (TaskCanceledException)
{
// EFT-Client timeout waiting for response
ShowNotification("EFT-CLIENT TIMEOUT", null, null, NotificationType.Error, true);
}
catch (Exception)
{
// TODO: Handle failed EFTBasketDataRequest. Should still continue and attempt the transaction.
}
}
}

// Transaction request
var r = new EFTTransactionRequest();
Expand All @@ -297,7 +298,11 @@ async void BtnTender_Click(object sender, RoutedEventArgs e)
// Set application. Used for gift card & 3rd party payment
r.Application = TerminalApplication.EFTPOS;
// Set basket PAD tag
r.PurchaseAnalysisData.SetTag("SKU", basketId);
if(chkBasketData.IsChecked == true)
{
r.PurchaseAnalysisData.SetTag("SKU", basketId);
}


if (!await _eft.WriteRequestAsync(r))
{
Expand Down
12 changes: 12 additions & 0 deletions IPInterface.TestPOS/IPInterface.TestPOS.csproj
Expand Up @@ -75,14 +75,22 @@
<Compile Include="CredentialLocker.cs" />
<Compile Include="DataWriter.cs" />
<Compile Include="ExternalData.cs" />
<Compile Include="ViewModels\DialogUIHandler.cs" />
<Compile Include="ViewModels\EFTDisplayResponseVM.cs" />
<Compile Include="ViewModels\ProxyViewModel.cs" />
<Compile Include="Views\Converters.cs" />
<Compile Include="PadViewModel.cs" />
<Compile Include="Views\TestDialogUI.xaml.cs">
<DependentUpon>TestDialogUI.xaml</DependentUpon>
</Compile>
<Compile Include="Views\ProxyDialog.xaml.cs">
<DependentUpon>ProxyDialog.xaml</DependentUpon>
</Compile>
<Compile Include="RelayCommand.cs" />
<Page Include="Views\TestDialogUI.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand Down Expand Up @@ -123,6 +131,10 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\IPInterface.UIInterfaceDemo\IPInterface.UIInterfaceDemo.csproj">
<Project>{dd628b2f-ff0f-42a5-b9bf-1815440b0cb9}</Project>
<Name>IPInterface.UIInterfaceDemo</Name>
</ProjectReference>
<ProjectReference Include="..\IPInterface\IPInterface.csproj">
<Project>{3de3ff35-5303-41f0-9f66-5b5ab2b6b7df}</Project>
<Name>IPInterface</Name>
Expand Down
4 changes: 2 additions & 2 deletions IPInterface.TestPOS/Properties/AssemblyInfo.cs
Expand Up @@ -51,7 +51,7 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.1.0")]
[assembly: AssemblyFileVersion("1.3.1.0")]
[assembly: AssemblyVersion("1.3.2.0")]
[assembly: AssemblyFileVersion("1.3.2.0")]
[assembly: Guid("4c988f82-f976-4663-9541-d0178f5aae47")]

0 comments on commit bf639f2

Please sign in to comment.