Skip to content

Commit

Permalink
Added service folder to German SCUs
Browse files Browse the repository at this point in the history
  • Loading branch information
TSchmiedlechner committed Oct 1, 2024
1 parent bfe009b commit 240fd4a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public override StartCommandResult OnStartCommand(Intent intent, StartCommandFla

try
{
Task.Delay(20000).Wait();
var isSandbox = intent.GetBooleanExtra("sandbox", false);
var cashboxIdString = intent.GetStringExtra("cashboxid");
var accessToken = intent.GetStringExtra("accesstoken");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,15 @@ public async Task StopAsync()
private async Task InitializeDESwissbitScuAsync(PackageConfiguration packageConfig)
{
var scuProvider = new DESwissbitScuProvider();
var scu = scuProvider.CreateSCU(packageConfig, _cashboxId, _isSandbox, _logLevel);
var scu = scuProvider.CreateSCU(Environment.GetFolderPath(Environment.SpecialFolder.Personal), packageConfig, _cashboxId, _isSandbox, _logLevel);
_scus.Add(GetPrimaryUriForSignaturCreationUnit(packageConfig), scu);
Log.Logger.Debug($"Created German SCU of type 'fiskaltrust.Middleware.SCU.DE.Swissbit'.");
}

private async Task InitializeDEFiskalyCertifiedScuAsync(PackageConfiguration packageConfig)
{
var scuProvider = new DEFiskalyCertifiedScuProvider();
var scu = scuProvider.CreateSCU(packageConfig, _cashboxId, _isSandbox, _logLevel);
var scu = scuProvider.CreateSCU(Environment.GetFolderPath(Environment.SpecialFolder.Personal), packageConfig, _cashboxId, _isSandbox, _logLevel);
_scus.Add(GetPrimaryUriForSignaturCreationUnit(packageConfig), scu);
Log.Logger.Debug($"Created German SCU of type 'fiskaltrust.Middleware.SCU.DE.FiskalyCertified'.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ namespace fiskaltrust.AndroidLauncher.Common.Services.SCU
{
class DEFiskalyCertifiedScuProvider : IDESSCDProvider
{
public IDESSCD CreateSCU(PackageConfiguration scuConfiguration, Guid ftCashBoxId, bool isSandbox, LogLevel logLevel)
public IDESSCD CreateSCU(string workingDir, PackageConfiguration scuConfiguration, Guid ftCashBoxId, bool isSandbox, LogLevel logLevel)
{
scuConfiguration.Configuration["servicefolder"] = workingDir;
var bootstrapper = new ScuBootstrapper
{
Configuration = scuConfiguration.Configuration,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ namespace fiskaltrust.AndroidLauncher.Common.Services.SCU
{
class DESwissbitScuProvider : IDESSCDProvider
{
public IDESSCD CreateSCU(PackageConfiguration scuConfiguration, Guid ftCashBoxId, bool isSandbox, LogLevel logLevel)
public IDESSCD CreateSCU(string workingDir, PackageConfiguration scuConfiguration, Guid ftCashBoxId, bool isSandbox, LogLevel logLevel)
{
var dir = InitializeTseAsync();
scuConfiguration.Configuration["servicefolder"] = workingDir;
scuConfiguration.Configuration["devicePath"] = dir;

var bootstrapper = new ScuBootstrapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ namespace fiskaltrust.AndroidLauncher.Common.Services.SCU
{
interface IDESSCDProvider
{
IDESSCD CreateSCU(PackageConfiguration scuConfiguration, Guid ftCashBoxId, bool isSandbox, LogLevel logLevel);
IDESSCD CreateSCU(string workingDir, PackageConfiguration scuConfiguration, Guid ftCashBoxId, bool isSandbox, LogLevel logLevel);
}
}

0 comments on commit 240fd4a

Please sign in to comment.