How vkprajapati/payment-orchestrator works
This Laravel application provides merchant-scoped payment operations, API-key management, audit records, and dashboard views. A typical test-checkout request reaches a controller, creates an idempotent payment, and can submit it for provider processing; refunds and hosted Stripe checkout are separate branches. The API also exposes payment, refund, audit, and key-management capabilities. Relationships below are limited to controller calls and dependencies listed in the supplied excerpts or SOURCE INDEX; routes and several implementation details were not sampled.
Main entry points: TestCheckoutController.php Test checkout · RefundController.php Refund API · ApiKeyController.php API key API · AuditLogger.php Audit logging
Components 25
Request handling
- Test checkout
app/Http/Controllers/TestCheckoutController.php - Payment API
app/Http/Controllers/Api/V1/PaymentController.php - Refund API
app/Http/Controllers/Api/V1/RefundController.php - API key API
app/Http/Controllers/Api/V1/ApiKeyController.php
Payment lifecycle
- Payment creation
app/Actions/Payments/CreateIdempotentPayment.php - Payment processing
app/Actions/Payments/ProcessPaymentWithFailover.php - Hosted checkout
app/Actions/Payments/InitiateStripeCheckout.php - Refund processing
app/Actions/Payments/ProcessRefund.php - Webhook reconciliation
app/Actions/Payments/ReconcilePaymentWebhook.php - Provider registry
app/Services/Payments/PaymentProviderManager.php - Webhook registry
app/Services/Payments/PaymentWebhookManager.php - Provider setup
app/Providers/PaymentServiceProvider.php - Payment providers
app/Services/Payments/Providers - Payment records
app/Models/Payment.php
Merchant access
- Current merchant
app/Services/Merchants/CurrentMerchant.php - Key management
app/Actions/ApiKeys/CreateApiKey.php - API key context
app/Services/ApiKeys/ApiRequestContext.php - Request idempotency
app/Actions/Api/HandleIdempotentRequest.php - Merchant records
app/Models/Merchant.php
Audit operations
- Audit logging
app/Services/Audit/AuditLogger.php - Audit retention and metrics
app/Actions/Audit
Merchant interface
- Payment dashboard
app/Http/Controllers/PaymentDashboardController.php - Merchant dashboard
app/Actions/Dashboard/GetMerchantDashboard.php
Other components
- Merchant user
- API client
Connections 26
- Merchant user → Test checkout: submits checkout
app/Http/Controllers/TestCheckoutController.php - API client → Payment API: requests payment
- API client → Refund API: requests refund
- API client → API key API: manages keys
app/Http/Controllers/Api/V1/ApiKeyController.php - Test checkout → Payment creation: creates idempotently
app/Http/Controllers/TestCheckoutController.php - Test checkout → Payment processing: processes payment
app/Http/Controllers/TestCheckoutController.php - Test checkout → Hosted checkout: starts checkout
app/Http/Controllers/TestCheckoutController.php - Test checkout → Refund processing: processes refund
app/Http/Controllers/TestCheckoutController.php - Test checkout → Audit logging: records events
app/Http/Controllers/TestCheckoutController.php - Test checkout → Current merchant: resolves merchant
app/Http/Controllers/TestCheckoutController.php - Payment API → Request idempotency: wraps requests
- Refund API → Request idempotency: wraps requests
app/Http/Controllers/Api/V1/RefundController.php - Refund API → Refund processing: processes refund
app/Http/Controllers/Api/V1/RefundController.php - Refund API → Audit logging: records events
app/Http/Controllers/Api/V1/RefundController.php - API key API → Request idempotency: wraps creation
app/Http/Controllers/Api/V1/ApiKeyController.php - API key API → Key management: manages keys
app/Http/Controllers/Api/V1/ApiKeyController.php - API key API → Audit logging: records events
app/Http/Controllers/Api/V1/ApiKeyController.php - Payment creation → Payment records: creates payment
- Payment API → API key context: uses request context
- Provider setup → Provider registry: registers providers
app/Providers/PaymentServiceProvider.php - Provider setup → Webhook registry: registers handlers
app/Providers/PaymentServiceProvider.php - Provider setup → Payment providers: configures providers
app/Providers/PaymentServiceProvider.php - Webhook registry → Webhook reconciliation: resolves webhook provider
- Payment dashboard → Current merchant: resolves merchant
app/Http/Controllers/PaymentDashboardController.php - Payment dashboard → Payment records: queries payments
app/Http/Controllers/PaymentDashboardController.php - Audit retention and metrics → Audit logging: maintains audit data