- docker
- docker-compose
Start the containers with:
docker-compose up -d --build
Give it a moment to build and spin up. Unit tests are run as part of the build.
Once ready, you can browse to the following:
- Swagger UI: http://localhost:5000/swagger
- Seq: http://localhost:5342/
You can interact with the Payment Gateway using the Swagger UI and view the logs in Seq.
There is also a Dockerfile to run sandbox tests. The following command will execute them:
docker run --rm $(docker build -q -f ./tests/sandbox/Dockerfile .)
(should work in both PowerShell and bash)
docker-compose down
- Windows 10
- Linux (via WSL2)
- JetBrains Rider
- .NET Core SDK 3.1.405
- PowerShell/bash
Main code lives in the src
directory. Tests can be found in tests
.
Contains all core logic and types. Interfaces to external dependencies (Bank, data storage) are defined here.
Implementations of external dependencies.
MartenDB was picked for data storage as it's quick to get up and running.
For the Bank, I created a FakeBankClient
to simulate an Acquiring bank. The adapter can return different results based on the merchantId being passed in. View the code for more details. This will be easy to swap out in the future.
Connects the Adapters up with the Core and hosts it as a WebApi.
- Metrics
- Authentication
- Performance testing
- Encryption