This is a demo approach to implement PaymentGateway
- .net core 6 Main Page or Installation Scripts
When .net core 6 is installed you can execute:
- open terminal and navigate where
PaymentGateway.sln
file is located - to build:
dotnet build
- to run test
dotnet test
- to start service
dotnet run --project PaymentGateway/PaymentGateway.csproj
open in browser: http://localhost:5089/swagger/index.html
so you can manually interact with the API
- Storage is in memory (for real purposes I would go for Postgresql)
- Only part of the code is covered with tests, as this is only for demo purposes
- Request/Response logs are collected by .net core middleware acitaved by
.AddHttpLogging
- Validations happens thanks to FluentValidation
- Logic is delegated from controllers to handlers which are invoked by MediatR
- Authentication is done by dummy approch to recognize a token from header (which can be extended in any direction)