How vivekawas-web/razorpayclone works
RazorPayCLONE is a Spring Boot payment-gateway backend. Its principal workflow accepts merchant payment requests, manages orders and payments, and exposes payment capture; the tree also includes payment-method processing, card tokenization, merchant authentication/API keys, and operational records. Sampled code confirms controller-to-service calls, signup/login persistence and token issuance, and payment-state transition logging. Service implementations and much of the payment orchestration were not sampled, so those internal connections are intentionally left unspecified; the README describes several dashboard and SDK capabilities as planned.
Main entry points: AuthServiceImpl.java Authentication service · ApiKeyController.java API key API · PaymentTransitionService.java State transitions · AuthController.java Authentication API
Components 23
Merchant access
- Authentication API
src/main/java/com/projectsByVivek/razorPayM/merchantService/controller/AuthController.java - Authentication service
src/main/java/com/projectsByVivek/razorPayM/merchantService/service/impl/AuthServiceImpl.java - Merchant records
src/main/java/com/projectsByVivek/razorPayM/merchantService/repository/MerchantRepository.java - User records
src/main/java/com/projectsByVivek/razorPayM/merchantService/repository/AppUserRepository.java - JWT issuance
src/main/java/com/projectsByVivek/razorPayM/merchantService/security/JwtUtil.java - API key API
src/main/java/com/projectsByVivek/razorPayM/merchantService/controller/ApiKeyController.java - API key service
src/main/java/com/projectsByVivek/razorPayM/merchantService/service/impl/ApiKeyServiceImpl.java - API key records
src/main/java/com/projectsByVivek/razorPayM/merchantService/repository/ApiKeyRepository.java
Payment processing
- Order API
src/main/java/com/projectsByVivek/razorPayM/paymentService/controller/OrderController.java - Order service
src/main/java/com/projectsByVivek/razorPayM/paymentService/service/impl/OrderServiceImpl.java - Payment API
src/main/java/com/projectsByVivek/razorPayM/paymentService/controller/paymentController.java - Payment service
src/main/java/com/projectsByVivek/razorPayM/paymentService/service/impl/PaymentServiceImpl.java - Processor routing
src/main/java/com/projectsByVivek/razorPayM/paymentService/processor/PaymentProcessorRouter.java - Gateway routing
src/main/java/com/projectsByVivek/razorPayM/paymentService/gateway/PaymentGatewayRouter.java - State transitions
src/main/java/com/projectsByVivek/razorPayM/paymentService/stateMachine/PaymentTransitionService.java - Payment state machine
src/main/java/com/projectsByVivek/razorPayM/paymentService/stateMachine/PaymentStateMachine.java - Payment records
src/main/java/com/projectsByVivek/razorPayM/paymentService/repository/PaymentRepository.java - Transition logs
src/main/java/com/projectsByVivek/razorPayM/paymentService/repository/PaymentTransitionLogRepository.java
Card vault
- Vault API
src/main/java/com/projectsByVivek/razorPayM/vaultService/controller/VaultController.java - Vault service
src/main/java/com/projectsByVivek/razorPayM/vaultService/service/impl/VaultServiceImpl.java - Card token records
src/main/java/com/projectsByVivek/razorPayM/vaultService/repository/CardTokenRepository.java
Operations records
- Settlement and webhook records
src/main/java/com/projectsByVivek/razorPayM/operationsService/entity/Settlement.java
Other components
- Merchant client
Connections 15
- Merchant client → Authentication API: submits credentials
- Authentication API → Authentication service: calls auth
- Authentication service → Merchant records: checks and saves
- Authentication service → User records: saves and reads
- Authentication service → JWT issuance: generates token
- Merchant client → API key API: manages keys
- API key API → API key service: calls key service
- API key API → Order API: submits orders
- Order API → Order service: calls order service
- Merchant client → Payment API: initiates payment
- Payment API → Payment service: calls payment service
- State transitions → Payment state machine: computes transition
- State transitions → Transition logs: saves transition log
- Merchant client → Vault API: submits card
- Vault API → Vault service: tokenizes card