How menegais1/payment-processing works
This is a .NET payment-processing API for customer organizations. The principal workflow is: register and authenticate an organization, create an authorized transaction, persist it for idempotency, publish a processing message, and have a consumer update its status. Clients can also retrieve or synchronously cancel eligible transactions. The graph includes organization authentication, transaction persistence, and queue processing as distinct product stages. Edges are limited to excerpted calls, SOURCE INDEX references, or README statements; unsampled implementation details are not inferred.
Main entry points: Program.cs Application wiring · PaymentTransactionController.cs Transaction endpoints · TransactionRepository.cs Transaction repository · RabbitMqAsyncPaymentTransactionQueue.cs RabbitMQ queue adapter
Components 13
API and identity
- Organization endpoints
PaymentProcessing/Controllers/OrganizationController/OrganizationController.cs - JWT authentication
PaymentProcessing/Services/AuthenticationService.cs - Application wiring
PaymentProcessing/Program.cs
Transaction lifecycle
- Transaction endpoints
PaymentProcessing/Controllers/PaymentTransactionController/PaymentTransactionController.cs - Transaction model
PaymentProcessing.Data/Models/Transaction.cs
Persistence
- Organization repository
PaymentProcessing.Data/Repositories/Organization - Organization model
PaymentProcessing.Data/Models/Organization.cs - Transaction repository
PaymentProcessing.Data/Repositories/Transaction/TransactionRepository.cs - EF database context
PaymentProcessing.Data/Database/PaymentProcessingContext.cs
Async processing
- Processing message
PaymentProcessing/Services/QueueServices/Schemas/PaymentTransactionMessagePayload.cs - RabbitMQ queue adapter
PaymentProcessing/Services/QueueServices/RabbitMqAsyncPaymentTransactionQueue.cs - Transaction processor
PaymentProcessing/Services/PaymentTransactionService.cs
Other components
- API client
Connections 17
- API client → Organization endpoints: registers or authenticates
README.md - Organization endpoints → Organization repository: creates or validates
PaymentProcessing/Controllers/OrganizationController/OrganizationController.cs - Organization endpoints → JWT authentication: generates token
PaymentProcessing/Controllers/OrganizationController/OrganizationController.cs - Organization repository → EF database context: uses context
PaymentProcessing.Data/Repositories/Organization/OrganizationRepository.cs - Organization model → Transaction model: has transactions
PaymentProcessing.Data/Models/Organization.cs - API client → Transaction endpoints: creates, reads, cancels
PaymentProcessing/Controllers/PaymentTransactionController/PaymentTransactionController.cs - Transaction endpoints → Transaction repository: checks, saves, updates
PaymentProcessing/Controllers/PaymentTransactionController/PaymentTransactionController.cs - Transaction repository → EF database context: reads and writes
PaymentProcessing.Data/Repositories/Transaction/TransactionRepository.cs - Transaction endpoints → RabbitMQ queue adapter: publishes message
PaymentProcessing/Controllers/PaymentTransactionController/PaymentTransactionController.cs - Transaction endpoints → Processing message: creates payload
PaymentProcessing/Controllers/PaymentTransactionController/PaymentTransactionController.cs - RabbitMQ queue adapter → Processing message: serializes payload
PaymentProcessing/Services/QueueServices/RabbitMqAsyncPaymentTransactionQueue.cs - Transaction processor → RabbitMQ queue adapter: consumes messages
PaymentProcessing/Services/PaymentTransactionService.cs - Transaction processor → Transaction repository: updates status
PaymentProcessing/Services/PaymentTransactionService.cs - Application wiring → RabbitMQ queue adapter: registers queue
PaymentProcessing/Program.cs - Application wiring → Transaction processor: registers processor
PaymentProcessing/Program.cs - Application wiring → Transaction repository: registers repository
PaymentProcessing/Program.cs - Application wiring → Organization repository: registers repository
PaymentProcessing/Program.cs