The Payment Processing Microservice is a lightweight, modular, and plug-and-play service built with Spring Boot to initiate, process, and track payments. It follows object-oriented design principles to ensure maintainability and scalability while providing seamless payment handling.
- Initiate, process, and track payments.
- Default integration with Razorpay as the payment gateway.
- Modular architecture to support multiple payment gateways.
- Workflow-based interface to easily switch between payment services.
- Ensures minimal downtime with dynamic gateway selection.
- Follows MVC architecture for structured development.
- Uses Data Transfer Objects (DTOs) for efficient data handling.
- Implements object-oriented principles for maintainability.
- Language: Java
- Framework: Spring Boot
- Payment Gateway: Razorpay (default)
- Database: PostgreSQL / MySQL
- Security: Spring Security & JWT Authentication
Ensure you have the following installed:
- Java 11+
- Maven
- PostgreSQL or MySQL
- Docker (optional, for containerized deployment)
sh git clone https://github.com/your-username/payment-microservice.git cd payment-service
Create a .env file and configure the following: ini DB_HOST=localhost DB_PORT=5432 DB_USER=your_user DB_PASSWORD=your_password DB_NAME=payment_db PAYMENT_GATEWAY=razorpay RAZORPAY_KEY=your_key RAZORPAY_SECRET=your_secret
sh mvn clean install
sh mvn flyway:migrate
sh mvn spring-boot:run
sh SPRING_PROFILES_ACTIVE=prod mvn spring-boot:run
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch.
- Commit your changes.
- Submit a pull request.