Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<PackageReference Include="EstateManagement.Client" Version="1.0.10.2" />
<PackageReference Include="MessagingService.Client" Version="1.0.10.2" />
<PackageReference Include="SecurityService.Client" Version="1.0.6.2" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.5" />
<PackageReference Include="Shared.EventStore" Version="1.0.5" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.12" />
<PackageReference Include="Shared.EventStore" Version="1.0.12" />
<PackageReference Include="MediatR" Version="9.0.0" />
<PackageReference Include="System.IO.Abstractions" Version="13.2.9" />
<PackageReference Include="VoucherManagement.Client" Version="1.0.4.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ClientProxyBase" Version="1.0.5" />
<PackageReference Include="ClientProxyBase" Version="1.0.12" />
</ItemGroup>

<ItemGroup>
Expand Down
14 changes: 11 additions & 3 deletions TransactionProcessor.IntegrationTests/Shared/SharedSteps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -790,10 +790,18 @@ public async Task GivenIMakeTheFollowingManualMerchantDeposits(Table table)

this.TestingContext.Logger.LogInformation($"Deposit Reference {makeMerchantDepositRequest.Reference} made for Merchant {merchantName}");

// Check the merchant balance
MerchantBalanceResponse currentMerchantBalance = await this.TestingContext.DockerHelper.EstateClient.GetMerchantBalance(token, estateDetails.EstateId, merchantId, CancellationToken.None);
await Retry.For(async () =>
{
// Check the merchant balance
MerchantBalanceResponse currentMerchantBalance =
await this.TestingContext.DockerHelper.EstateClient.GetMerchantBalance(token,
estateDetails.EstateId,
merchantId,
CancellationToken.None);

currentMerchantBalance.AvailableBalance.ShouldBe(previousMerchantBalance.AvailableBalance + makeMerchantDepositRequest.Amount);
});

currentMerchantBalance.AvailableBalance.ShouldBe(previousMerchantBalance.AvailableBalance + makeMerchantDepositRequest.Amount);

}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ClientProxyBase" Version="1.0.5" />
<PackageReference Include="ClientProxyBase" Version="1.0.12" />
<PackageReference Include="Ductus.FluentDocker" Version="2.10.7" />
<PackageReference Include="EstateManagement.Client" Version="1.0.10.2" />
<PackageReference Include="EstateReporting.Database" Version="1.0.13.1" />
Expand All @@ -17,7 +17,7 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="SecurityService.Client" Version="1.0.6.2" />
<PackageReference Include="Shared.IntegrationTesting" Version="1.0.7" />
<PackageReference Include="Shared.IntegrationTesting" Version="1.0.12" />
<PackageReference Include="Shouldly" Version="4.0.3" />
<PackageReference Include="SpecFlow" Version="3.5.14" />
<PackageReference Include="SpecFlow.Tools.MsBuild.Generation" Version="3.5.14" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.5" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.12" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Shared.EventStore" Version="1.0.5" />
<PackageReference Include="Shared.EventStore" Version="1.0.12" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.5" />
<PackageReference Include="Shared.DomainDrivenDesign" Version="1.0.12" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Shared.EventStore" Version="1.0.5" />
<PackageReference Include="Shared.EventStore" Version="1.0.12" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion TransactionProcessor/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
FROM stuartferguson/txnprocbase:latest AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:5.0.102-ca-patch-buster-slim AS build
Expand Down
11 changes: 10 additions & 1 deletion TransactionProcessor/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,11 @@ public class Startup
public Startup(IWebHostEnvironment webHostEnvironment)
{
IConfigurationBuilder builder = new ConfigurationBuilder().SetBasePath(webHostEnvironment.ContentRootPath)
.AddJsonFile("/home/txnproc/config/appsettings.json", true, true)
.AddJsonFile($"/home/txnproc/config/appsettings.{webHostEnvironment.EnvironmentName}.json", optional: true)
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.AddJsonFile($"appsettings.{webHostEnvironment.EnvironmentName}.json", optional: true).AddEnvironmentVariables();
.AddJsonFile($"appsettings.{webHostEnvironment.EnvironmentName}.json", optional: true, reloadOnChange: true)
.AddEnvironmentVariables();

Startup.Configuration = builder.Build();
Startup.WebHostEnvironment = webHostEnvironment;
Expand Down Expand Up @@ -386,6 +389,12 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerF

Logger.Initialise(logger);

Action<String> loggerAction = message =>
{
Logger.LogInformation(message);
};
Startup.Configuration.LogConfiguration(loggerAction);

foreach (KeyValuePair<Type, String> type in TypeMap.Map)
{
Logger.LogInformation($"Type name {type.Value} mapped to {type.Key.Name}");
Expand Down
2 changes: 1 addition & 1 deletion TransactionProcessor/TransactionProcessor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.8" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.1" />
<PackageReference Include="NLog.Extensions.Logging" Version="1.7.0" />
<PackageReference Include="Shared.EventStore" Version="1.0.5" />
<PackageReference Include="Shared.EventStore" Version="1.0.12" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.1.1" />
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.1.1" />
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="7.0.2" />
Expand Down
34 changes: 2 additions & 32 deletions TransactionProcessor/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,6 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"EventStoreSettings": {
"ConnectionString": "https://192.168.1.133:2113",
"ConnectionName": "Transaction Processor",
"UserName": "admin",
"Password": "changeit",
"START_PROJECTIONS": false,
"ContinuousProjectionsFolder": "",
"TcpPort": 1113,
"PersistentSubscriptionPollingInSeconds": 30
},
"ConnectionStrings": {
//"ConnectionStringConfiguration": "server=192.168.1.133;database=ConnectionStringConfiguration;user id=sa;password=Sc0tland"
},
"AppSettings": {
"SubscriptionFilter": "Transaction Processor",
"HandlerEventTypesToSilentlyHandle": {
},
"UseConnectionStringConfig": false,
"SecurityService": "https://192.168.1.133:5001",
"EstateManagementApi": "http://192.168.1.133:5000",
"MessagingServiceApi": "http://192.168.1.133:5006",
"VoucherManagementApi": "http://192.168.1.133:5007",
"ClientId": "serviceClient",
"ClientSecret": "d192cbc46d834d0da90e8a9d50ded543",
"EventHandlerConfiguration": {
Expand All @@ -40,19 +13,16 @@
}
},
"SecurityConfiguration": {
"ApiName": "transactionProcessor",
"Authority": "https://192.168.1.133:5001"
"ApiName": "transactionProcessor"
},
"AllowedHosts": "*",
"OperatorConfiguration": {
"Safaricom": {
"Url": "http://192.168.1.133:9000/api/safaricom",
"LoginId": "D-S136",
"MSISDN": "700945625",
"Pin": "0322",
"Password": "@SafePay33",
"ExtCode": "SA"

"ExtCode": "SA"
}
}
}