C++ backend payment processing platform built using Drogon, PostgreSQL, Docker and GitHub Actions.
10K+
Payment App is a C++ backend application built using the Drogon web framework and PostgreSQL. The project was developed as a learning and demonstration platform for modern backend engineering concepts including REST APIs, asynchronous processing, connection pooling, worker thread management, retry processing, health monitoring, metrics collection, CI/CD and containerization.
The foundation of the application is designed with payment processing in mind, which is reflected in the project name. The current version does not connect to external payment networks or core banking systems. However, integration with Visa and Mastercard staging environments is part of the planned roadmap and will be implemented in future releases.
The application accepts transaction requests in JSON format through REST APIs.
Clients submit transaction requests using an HTTP POST request. Each request must contain a unique idempotency key to prevent duplicate transaction processing.
Upon receiving a valid request:
At this stage the request has been accepted for processing but may not yet have reached a final state.
Worker threads continuously monitor the processing queue and immediately wake when new transactions become available.
The worker:
In the current implementation, all successfully processed transactions are marked as:
SUCCESS
Future versions will replace this simulated processing with real integrations to external payment systems.
After receiving the HTTP 200 response from the POST request, clients can query the transaction status using the idempotency key.
Possible transaction states include:
PENDING
PROCESSING
SUCCESS
FAILED
FAILED_RETRYABLE
Transactions that fail due to temporary technical issues are not immediately discarded.
A dedicated retry worker periodically scans for retryable transactions and attempts reprocessing. This design provides resilience against transient failures and mimics behavior commonly found in payment processing systems.
The application exposes operational endpoints that can be used for monitoring and deployment automation.
Supported capabilities include:
These endpoints are designed to support future deployment in containerized and orchestration environments.
Planned enhancements include:
Content type
Image
Digest
sha256:57d093d9a…
Size
216.1 MB
Last updated
4 months ago
docker pull adarshnanu/payment_app