Payment Gateway
May 13, 2022 ยท View on GitHub
Simple Payment Gateway sample project using:
This project is only for demonstration purposes and should not be considered production-ready.
The solution includes the Payment Gateway as well an Acquiring Bank simulator for development and testing purposes.
Run using Docker Compose
You can run whole application using docker compose from root folder:
docker-compose up -d
It will create following services:
- Acquiring Bank Simulator
- Payment Gateway API
How to use
The Payment Gateway will allow you to interact with the API via Swagger UI. Check the Open API specification.
Type the following URL in your browser:
http://localhost:5270/swagger
Run tests
If you want to run the automated tests you can do it using docker compose from the root folder:
docker-compose -f .\docker-compose-tests.yml up
This will run all the tests.
You can also target only some tests:
docker-compose -f .\docker-compose-tests.yml up [payment-gateway-unittests | payment-gateway-apitests]
Improvements
- Replace InMemory eevent store with EventStoreDB | SQLStreamStore | Marten
- Implement idempotency (see API contract)
- Improve telemetry (OTEL)
- Anonymize PII (Personal Identifiable Information)
- Snapshotting sample
- Projections sample