How goride-app/goride-payment works
GoRide Payment accepts trusted trip-completion events, then lets riders select card payment and pay after the trip through saved demo cards or PayHere sandbox checkout. Verified provider notices commit paid state, in-app confirmation, email receipt, and driver notification together; riders and drivers can then read their respective results. The map also includes card management, receipt resend, status, and driver notification delivery. Relationships are cited to the README where the sampled source does not show the runtime call; unsampled implementation details are not inferred.
Main entry points: PaymentVerificationService.cs Notice verification · PaymentsController.cs Payment API · TripCompletionService.cs Trip completion · PaymentStore.cs Payment records
Components 33
API and identity
- Payment API
src/GoRide.Payment/Controllers/PaymentsController.cs - Card API
src/GoRide.Payment/Controllers/CardsController.cs - Driver feed API
src/GoRide.Payment/Controllers/DriverNotificationsController.cs - Identity session
src/GoRide.Payment/Auth/IdentitySessionHandler.cs - Trip event intake
src/GoRide.Payment/Controllers/TripEventsController.cs - Trip event consumer
src/GoRide.Payment/Events/TripEventConsumer.cs
Trip and payment
- Trip completion
src/GoRide.Payment/Checkout/TripCompletionService.cs - Payment records
src/GoRide.Payment/Data/PaymentStore.cs - Payment rules
src/GoRide.Payment/Services/PaymentRules.cs - Saved cards
src/GoRide.Payment/Cards/CardService.cs - Demo card charge
src/GoRide.Payment/Cards/CardPaymentService.cs - Card storage
src/GoRide.Payment/Cards/CardStore.cs - Card attempts
src/GoRide.Payment/Cards/CardAttemptStore.cs - Payment model
src/GoRide.Payment/Models/PaymentRecord.cs - Completion event model
src/GoRide.Payment/Models/TripCompletedEvent.cs - Demo card data
src/GoRide.Payment/Cards/DemoCards.cs - Payment status
src/GoRide.Payment/Services/PaymentStatusService.cs
Checkout and verification
- PayHere checkout
src/GoRide.Payment/Checkout/CheckoutService.cs - Checkout orders
src/GoRide.Payment/Checkout/CheckoutStore.cs - Provider notice API
src/GoRide.Payment/Controllers/ProviderNotificationsController.cs - Notice verification
src/GoRide.Payment/Verification/PaymentVerificationService.cs - Verification records
src/GoRide.Payment/Verification/VerificationStore.cs
Payment outcomes
- In-app confirmation
src/GoRide.Payment/Confirmation/ConfirmationService.cs - Confirmation records
src/GoRide.Payment/Confirmation/ConfirmationStore.cs - Receipt access
src/GoRide.Payment/Receipts/ReceiptService.cs - Receipt outbox
src/GoRide.Payment/Receipts/ReceiptStore.cs - Receipt delivery
src/GoRide.Payment/Receipts/ReceiptDispatcher.cs - Driver notifications
src/GoRide.Payment/DriverNotifications/DriverNotificationStore.cs
Other components
- Rider app
- Driver app
- Trip service
- PayHere sandbox
- Brevo email
Connections 31
- Trip service → Trip event intake: posts completion
README.md - Trip event intake → Trip completion: records trip
src/GoRide.Payment/Controllers/TripEventsController.cs - Trip completion → Payment records: saves fare
src/GoRide.Payment/Checkout/TripCompletionService.cs - Rider app → Payment API: requests payment
README.md - Payment API → Identity session: authenticates rider
README.md - Payment API → PayHere checkout: opens checkout
README.md - PayHere checkout → Checkout orders: stores order
src/GoRide.Payment/Checkout/CheckoutService.cs - PayHere checkout → PayHere sandbox: returns signed form
README.md - PayHere sandbox → Provider notice API: sends notice
README.md - Provider notice API → Notice verification: verifies notice
src/GoRide.Payment/Controllers/ProviderNotificationsController.cs - Notice verification → Verification records: records outcome
src/GoRide.Payment/Verification/PaymentVerificationService.cs - Notice verification → Payment records: commits paid state
- Notice verification → Confirmation records: creates confirmation
- Notice verification → Receipt outbox: creates outbox entry
- Notice verification → Driver notifications: creates snapshot
- Rider app → Card API: manages cards
README.md - Card API → Saved cards: requests card action
src/GoRide.Payment/Controllers/CardsController.cs - Saved cards → Card storage: stores card
src/GoRide.Payment/Cards/CardService.cs - Demo card charge → Card attempts: records attempts
src/GoRide.Payment/Cards/CardPaymentService.cs - Demo card charge → Payment records: charges saved card
src/GoRide.Payment/Cards/CardPaymentService.cs - Rider app → In-app confirmation: views confirmation
README.md - Rider app → Receipt access: views or resends
README.md - Receipt delivery → Receipt outbox: claims receipt
src/GoRide.Payment/Receipts/ReceiptDispatcher.cs - Receipt delivery → Brevo email: sends email
README.md - Driver app → Driver feed API: reads feed
README.md - Driver feed API → Driver notifications: reads notifications
src/GoRide.Payment/Controllers/DriverNotificationsController.cs - Payment API → Payment status: reads status
src/GoRide.Payment/Controllers/PaymentsController.cs - Trip event consumer → Trip completion: processes event
src/GoRide.Payment/Events/TripEventConsumer.cs - Payment records → Payment model: persists model
src/GoRide.Payment/Data/PaymentStore.cs - Trip completion → Payment rules: validates completion
src/GoRide.Payment/Checkout/TripCompletionService.cs - Saved cards → Demo card data: uses test data
src/GoRide.Payment/Cards/CardService.cs