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
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "nuget"
directory: "/"
schedule:
interval: "weekly"
allow:
- dependency-name: "SixLabors.ImageSharp"
ignore:
- dependency-name: "SixLabors.ImageSharp"
versions: [">= 3.2.0"]
54 changes: 25 additions & 29 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,25 @@
<PackageVersion Include="AspNetCore.HealthChecks.UI.Client" Version="9.0.0" />
<PackageVersion Include="AspNetCore.HealthChecks.UI.InMemory.Storage" Version="9.0.0" />
<PackageVersion Include="AspNetCore.HealthChecks.Uris" Version="9.0.0" />
<PackageVersion Include="CallbackHandler.DataTransferObjects" Version="2026.9.3.167" />
<PackageVersion Include="ClientProxyBase" Version="2026.10.3" />
<PackageVersion Include="CallbackHandler.DataTransferObjects" Version="2026.10.2.169" />
<PackageVersion Include="ClientProxyBase" Version="2026.10.4" />
<PackageVersion Include="coverlet.collector" Version="10.1.0" />
<PackageVersion Include="coverlet.msbuild" Version="10.1.0" />
<PackageVersion Include="Ductus.FluentDocker" Version="2.85.0" />
<PackageVersion Include="EntityFrameworkCore.Exceptions.Common" Version="10.0.1" />
<PackageVersion Include="EntityFrameworkCore.Exceptions.SqlServer" Version="10.0.1" />
<PackageVersion Include="EventStoreProjections" Version="2023.12.3" />
<PackageVersion Include="FileProcessor.File.DomainEvents" Version="2026.9.4.166" />
<PackageVersion Include="FileProcessor.FileImportLog.DomainEvents" Version="2026.9.4.166" />
<PackageVersion Include="HealthMonitoring.Client" Version="2026.9.4.53" />
<PackageVersion Include="FileProcessor.File.DomainEvents" Version="2026.10.1" />
<PackageVersion Include="FileProcessor.FileImportLog.DomainEvents" Version="2026.10.1" />
<PackageVersion Include="HealthMonitoring.Client" Version="2026.10.1" />
<PackageVersion Include="Lamar" Version="16.0.0" />
<PackageVersion Include="Lamar.Microsoft.DependencyInjection" Version="16.0.0" />
<PackageVersion Include="MediatR" Version="14.2.0" />
<PackageVersion Include="MessagingService.Client" Version="2026.9.3.155" />
<PackageVersion Include="MessagingService.IntegrationTesting.Helpers" Version="2026.9.3.155" />
<PackageVersion Include="MessagingService.Client" Version="2026.10.2.156" />
<PackageVersion Include="MessagingService.IntegrationTesting.Helpers" Version="2026.10.2.156" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.13" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.13" />
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="10.0.13" />
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="10.0.13" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.13" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.DynamicLinq" Version="10.7.4" />
Expand All @@ -44,7 +45,7 @@
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.11.0" />
<PackageVersion Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.23.0" />
<PackageVersion Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="10.0.2" />
<PackageVersion Include="Imposter" Version="1.0.1" />
<PackageVersion Include="Imposter" Version="1.0.3" />
<PackageVersion Include="NetBarcode" Version="1.8.3" />
<PackageVersion Include="NLog.Extensions.Logging" Version="6.2.2" />
<PackageVersion Include="NuGet.Packaging" Version="7.9.0" />
Expand All @@ -53,7 +54,7 @@
<PackageVersion Include="NUnit3TestAdapter" Version="6.3.1" />
<PackageVersion Include="OpenIddict.Validation.AspNetCore" Version="7.7.2" />
<PackageVersion Include="OpenIddict.Validation.SystemNetHttp" Version="7.7.2" />
<PackageVersion Include="OpenTelemetry.Api" Version="1.20.0" />
<PackageVersion Include="OpenTelemetry.Api" Version="1.20.1" />
<PackageVersion Include="Polly" Version="8.8.0" />
<PackageVersion Include="Pomelo.EntityFrameworkCore.MySql" Version="8.0.2" />
<PackageVersion Include="prometheus-net" Version="8.2.1" />
Expand All @@ -62,33 +63,28 @@
<PackageVersion Include="Reqnroll.NUnit" Version="3.3.4" />
<PackageVersion Include="Reqnroll.Tools.MsBuild.Generation" Version="3.3.4" />
<PackageVersion Include="RichardSzalay.MockHttp" Version="7.1.0" />
<PackageVersion Include="SecurityService.Client" Version="2026.9.3.198" />
<PackageVersion Include="SecurityService.IntegrationTesting.Helpers" Version="2026.9.3.198" />
<PackageVersion Include="SecurityService.Client" Version="2026.10.2.200" />
<PackageVersion Include="SecurityService.IntegrationTesting.Helpers" Version="2026.10.2.200" />
<PackageVersion Include="Sentry.AspNetCore" Version="6.12.1" />
<PackageVersion Include="Shared" Version="2026.10.3" />
<PackageVersion Include="Shared.DomainDrivenDesign" Version="2026.10.3" />
<PackageVersion Include="Shared.EventStore" Version="2026.10.3" />
<PackageVersion Include="Shared.IntegrationTesting" Version="2026.10.3" />
<PackageVersion Include="Shared.Results" Version="2026.10.3" />
<PackageVersion Include="Shared.Results.Web" Version="2026.10.3" />
<PackageVersion Include="SharpCompress" Version="0.50.5" />
<PackageVersion Include="Shared" Version="2026.10.4" />
<PackageVersion Include="Shared.DomainDrivenDesign" Version="2026.10.4" />
<PackageVersion Include="Shared.EventStore" Version="2026.10.4" />
<PackageVersion Include="Shared.IntegrationTesting" Version="2026.10.4" />
<PackageVersion Include="Shared.Results" Version="2026.10.4" />
<PackageVersion Include="Shared.Results.Web" Version="2026.10.4" />
<PackageVersion Include="SharpCompress" Version="0.50.7" />
<PackageVersion Include="Shouldly" Version="4.3.0" />
<PackageVersion Include="SixLabors.ImageSharp" Version="3.1.12" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="10.3.0" />
<PackageVersion Include="Swashbuckle.AspNetCore.Annotations" Version="10.3.0" />
<PackageVersion Include="Swashbuckle.AspNetCore.Filters" Version="10.0.1" />
<PackageVersion Include="Swashbuckle.AspNetCore.Swagger" Version="10.3.0" />
<PackageVersion Include="Swashbuckle.AspNetCore.SwaggerGen" Version="10.3.0" />
<PackageVersion Include="Swashbuckle.AspNetCore.SwaggerUI" Version="10.3.0" />
<PackageVersion Include="System.IO.Abstractions" Version="22.3.0" />
<PackageVersion Include="System.IO.Abstractions.TestingHelpers" Version="22.3.0" />
<PackageVersion Include="System.Security.Cryptography.Xml" Version="10.0.13" />
<PackageVersion Include="System.ServiceModel.Duplex" Version="6.0.0" />
<PackageVersion Include="System.ServiceModel.Federation" Version="10.0.652802" />
<PackageVersion Include="System.ServiceModel.Http" Version="10.0.652802" />
<PackageVersion Include="System.ServiceModel.NetTcp" Version="10.0.652802" />
<PackageVersion Include="System.ServiceModel.Federation" Version="10.1.0" />
<PackageVersion Include="System.ServiceModel.Http" Version="10.1.0" />
<PackageVersion Include="System.ServiceModel.NetTcp" Version="10.1.0" />
<PackageVersion Include="System.ServiceModel.Security" Version="6.0.0" />
<PackageVersion Include="TestHosts.Clients" Version="2026.9.3.93" />
<PackageVersion Include="TestHosts.Clients" Version="2026.10.1" />
<PackageVersion Include="TransactionProcessing.ApiDefaults" Version="2026.10.4" />
<PackageVersion Include="xunit.v3" Version="4.0.0" />
<PackageVersion Include="xunit.v3.mtp-v2" Version="4.0.2" />
<PackageVersion Include="xunit.v3.extensibility.core" Version="4.0.0" />
Expand All @@ -107,4 +103,4 @@
<ItemGroup Condition="'$(MSBuildProjectName)' == 'TransactionProcessor.Reconciliation.DomainEvents'">
<PackageVersion Include="Shared.DomainDrivenDesign" Version="2025.1.2" />
</ItemGroup>
</Project>
</Project>
17 changes: 0 additions & 17 deletions NuGet.Config
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,6 @@
<add key="Feedz" value="https://f.feedz.io/transactionprocessing/nugets/nuget/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
<packageSourceMapping>
<packageSource key="Feedz">
<package pattern="CallbackHandler.*" />
<package pattern="ClientProxyBase" />
<package pattern="EventStoreProjections" />
<package pattern="FileProcessor.*" />
<package pattern="HealthMonitoring.*" />
<package pattern="MessagingService.*" />
<package pattern="SecurityService.*" />
<package pattern="Shared" />
<package pattern="Shared.*" />
<package pattern="TestHosts.Clients" />
</packageSource>
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
</packageSourceMapping>
<packageSourceCredentials>
<Feedz>
<add key="Username" value="TestUser" />
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Transaction Processor

The interactive Scalar API reference is available at `/scalar` and its versioned OpenAPI documents are available under `/openapi/` (for example, `/openapi/v1.json`). The [endpoint and DTO inventory](docs/api-reference.md) is also available as Markdown.

## Build Status

[![Last Nightly Build Status Badge](https://github.com/TransactionProcessing/TransactionProcessor/workflows/Nightly%20Build/badge.svg)](https://github.com/TransactionProcessing/TransactionProcessor/workflows/Nightly%20Build/badge.svg)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ public async Task Mediator_Send_RequestHandled()
hostingEnvironment.ApplicationName.Getter().Returns("Test Application");

ServiceRegistry services = new ServiceRegistry();
Startup s = new Startup(hostingEnvironment.Instance());
Startup.Configuration = this.SetupMemoryConfiguration();
IConfigurationRoot configuration = this.SetupMemoryConfiguration();

this.AddTestRegistrations(services, hostingEnvironment.Instance());
s.ConfigureContainer(services);
this.AddTestRegistrations(services, hostingEnvironment.Instance(), configuration);
Program.ConfigureServices(services, configuration, hostingEnvironment.Instance());
Container container = new(services);

List<String> errors = new List<String>();
IMediator mediator = Startup.Container.GetService<IMediator>();
IMediator mediator = container.GetService<IMediator>();
foreach (IBaseRequest baseRequest in this.Requests)
{
try
Expand Down Expand Up @@ -161,15 +161,16 @@ private IConfigurationRoot SetupMemoryConfiguration()
}

private void AddTestRegistrations(ServiceRegistry services,
IWebHostEnvironment hostingEnvironment)
IWebHostEnvironment hostingEnvironment,
IConfiguration configuration)
{
services.AddLogging();
DiagnosticListener diagnosticSource = new DiagnosticListener(hostingEnvironment.ApplicationName);
services.AddSingleton<DiagnosticSource>(diagnosticSource);
services.AddSingleton<DiagnosticListener>(diagnosticSource);
services.AddSingleton<IWebHostEnvironment>(hostingEnvironment);
services.AddSingleton<IHostEnvironment>(hostingEnvironment);
services.AddSingleton<IConfiguration>(Startup.Configuration);
services.AddSingleton<IConfiguration>(configuration);

services.OverrideServices(s => {
s.AddSingleton<ISettlementDomainService, DummySettlementDomainService>();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,46 @@
using System;
using System;

namespace TransactionProcessor.DataTransferObjects{

/// <summary>
/// Float identifier and creation timestamp.
/// </summary>
/// <example>{"floatId":"00000000-0000-0000-0000-000000000166","createDateTime":"2026-01-15T10:30:00Z"}</example>
public class CreateFloatRequest{

/// <summary>
/// Identifier of the float.
/// </summary>
public Guid FloatId { get; set; }

/// <summary>
/// Date and time the float was created.
/// </summary>
public DateTime CreateDateTime{ get; set; }
}

/// <summary>
/// Float credit amount, cost price, and purchase timestamp.
/// </summary>
/// <example>{"floatId":"00000000-0000-0000-0000-000000000166","purchaseDateTime":"2026-01-15T10:30:00Z","creditAmount":42.5,"costPrice":42.5}</example>
public class RecordFloatCreditPurchaseRequest{
/// <summary>
/// Identifier of the float.
/// </summary>
public Guid FloatId { get; set; }

/// <summary>
/// Date and time of the credit purchase.
/// </summary>
public DateTime PurchaseDateTime { get; set; }

/// <summary>
/// Amount of credit added to the float.
/// </summary>
public Decimal CreditAmount { get; set; }
/// <summary>
/// Cost of purchasing the float credit.
/// </summary>
public Decimal CostPrice { get; set; }
}
}
36 changes: 34 additions & 2 deletions TransactionProcessor.DataTransferObjects/DataTransferObject.cs
Original file line number Diff line number Diff line change
@@ -1,35 +1,67 @@
namespace TransactionProcessor.DataTransferObjects
namespace TransactionProcessor.DataTransferObjects
{
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;

/// <summary>
/// Shared estate, merchant, transaction timestamp, and transaction type fields.
/// </summary>
/// <example>{"estateId":"00000000-0000-0000-0000-000000000023","merchantId":"00000000-0000-0000-0000-000000000227","transactionDateTime":"2026-01-15T10:30:00Z","transactionType":"example"}</example>
[ExcludeFromCodeCoverage]
public class TransactionRequest
{
#region Properties

/// <summary>
/// Estate that owns or scopes this operation.
/// </summary>
public Guid EstateId { get; set; }

/// <summary>
/// Merchant associated with the transaction.
/// </summary>
public Guid MerchantId { get; set; }

/// <summary>
/// Date and time when the transaction occurred at the terminal.
/// </summary>
public DateTime TransactionDateTime { get; set; }

/// <summary>
/// Transaction type reported by the terminal.
/// </summary>
public String TransactionType { get; set; }

#endregion
}

/// <summary>
/// Shared estate, merchant, response status, transaction identifier, and transaction type fields.
/// </summary>
/// <example>{"estateId":"00000000-0000-0000-0000-000000000023","merchantId":"00000000-0000-0000-0000-000000000227","responseCode":"VOUCHER-2026-001","responseMessage":"Example message","transactionId":"00000000-0000-0000-0000-000000000057","transactionType":"example"}</example>
public class TransactionResponse {
/// <summary>
/// Estate that owns or scopes this operation.
/// </summary>
public Guid EstateId { get; set; }

/// <summary>
/// Merchant associated with the transaction.
/// </summary>
public Guid MerchantId { get; set; }
/// <summary>The response code.</summary>

public String ResponseCode { get; set; }
/// <summary>The response message.</summary>

public String ResponseMessage { get; set; }
/// <summary>The transaction id.</summary>

public Guid TransactionId { get; set; }
/// <summary>
/// Transaction type reported by the terminal.
/// </summary>
public String TransactionType { get; set; }
}
}
}
18 changes: 17 additions & 1 deletion TransactionProcessor.DataTransferObjects/GetVoucherResponse.cs
Original file line number Diff line number Diff line change
@@ -1,29 +1,45 @@
using System;
using System;

namespace TransactionProcessor.DataTransferObjects
{
/// <summary>
/// Voucher identity, value, balance, lifecycle status, dates, and associated transaction.
/// </summary>
/// <example>{"voucherId":"00000000-0000-0000-0000-000000000141","expiryDate":"2026-01-15T10:30:00Z","value":42.5,"balance":42.5,"voucherCode":"VOUCHER-2026-001","isGenerated":false,"isIssued":false,"isRedeemed":false,"issuedDateTime":"2026-01-15T10:30:00Z","generatedDateTime":"2026-01-15T10:30:00Z","redeemedDateTime":"2026-01-15T10:30:00Z","transactionId":"00000000-0000-0000-0000-000000000057"}</example>
public class GetVoucherResponse
{
/// <summary>The voucher id.</summary>
public Guid VoucherId { get; set; }
/// <summary>The expiry date.</summary>

public DateTime ExpiryDate { get; set; }
/// <summary>The value.</summary>

public Decimal Value { get; set; }
/// <summary>The balance.</summary>

public Decimal Balance { get; set; }
/// <summary>The voucher code.</summary>

public String VoucherCode { get; set; }
/// <summary>The is generated.</summary>

public Boolean IsGenerated { get; set; }
/// <summary>The is issued.</summary>

public Boolean IsIssued { get; set; }
/// <summary>The is redeemed.</summary>
public Boolean IsRedeemed { get; set; }
/// <summary>The issued date time.</summary>

public DateTime IssuedDateTime { get; set; }
/// <summary>The generated date time.</summary>

public DateTime GeneratedDateTime { get; set; }
/// <summary>The redeemed date time.</summary>

public DateTime RedeemedDateTime { get; set; }
/// <summary>The transaction id.</summary>

public Guid TransactionId { get; set; }
}
Expand Down
13 changes: 11 additions & 2 deletions TransactionProcessor.DataTransferObjects/IssueVoucherRequest.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
namespace TransactionProcessor.DataTransferObjects
namespace TransactionProcessor.DataTransferObjects
{
using System;
/// <summary>Data transfer object for IssueVoucherRequest.</summary>
/// <example>{"operatorIdentifier":"EXAMPLE-001","estateId":"00000000-0000-0000-0000-000000000023","transactionId":"00000000-0000-0000-0000-000000000057","value":42.5,"recipientEmail":"customer@example.com","recipientMobile":"+15550100","issuedDateTime":"2026-01-15T10:30:00Z"}</example>

public class IssueVoucherRequest
{
/// <summary>The operator identifier.</summary>
public String OperatorIdentifier { get; set; }
/// <summary>The estate id.</summary>

public Guid EstateId { get; set; }
/// <summary>The transaction id.</summary>

public Guid TransactionId { get; set; }
/// <summary>The value.</summary>

public Decimal Value { get; set; }
/// <summary>The recipient email.</summary>

public String RecipientEmail { get; set; }
/// <summary>The recipient mobile.</summary>

public String RecipientMobile { get; set; }
/// <summary>The issued date time.</summary>

public DateTime? IssuedDateTime { get; set; }
}
}
}
Loading
Loading