How nhwin304/momo-payment works
This Laravel package provides MoMo v2 payment creation, transaction queries, and IPN verification, with a Filament admin page for global gateway settings. The main workflow is an application calling the payment service, which loads credentials and endpoints, signs requests, and exchanges them with MoMo; the application remains responsible for orders and IPN routes. The graph includes documented query and IPN capabilities. Relationships are limited to excerpted calls and README statements; no application-owned order or callback controller is present in this repository.
Main entry points: MoMoPaymentService.php Payment service · MoMoSettingsPage.php Settings page · MoMoConfiguration.php Credential config · MoMoPaymentServiceProvider.php Service provider
Components 15
Payment runtime
- Payment service
src/Services/MoMoPaymentService.php - Credential config
src/Services/MoMoConfiguration.php - HMAC signer
src/Services/MoMoSigner.php - Payment errors
src/Exceptions/MoMoPaymentException.php
Admin settings
- Filament plugin
src/Filament/MoMoPlugin.php - Settings page
src/Filament/Pages/MoMoSettingsPage.php - Settings form view
resources/views/filament/pages/momo-settings.blade.php - Settings validator
src/Settings/MoMoSettingsValidator.php - Settings definition
src/Settings/MoMoSettingsDefinition.php
Package integration
- Service provider
src/MoMoPaymentServiceProvider.php - Package config
config/momo-payment.php
Other components
- Laravel application
- MoMo API
- Admin user
- Settings store
Connections 21
- Laravel application → Payment service: calls
README.md - Payment service → Credential config: loads credentials
src/Services/MoMoPaymentService.php - Payment service → HMAC signer: signs requests
src/Services/MoMoPaymentService.php - Payment service → MoMo API: posts create/query
src/Services/MoMoPaymentService.php - Payment service → Credential config: selects endpoint
src/Services/MoMoPaymentService.php - Payment service → Payment errors: throws errors
src/Services/MoMoPaymentService.php - Payment service → HMAC signer: verifies IPN
src/Services/MoMoPaymentService.php - Admin user → Filament plugin: registers
README.md - Filament plugin → Settings page: registers page
src/Filament/MoMoPlugin.php - Settings page → Settings form view: renders
src/Filament/Pages/MoMoSettingsPage.php - Settings page → Settings validator: validates saves
src/Filament/Pages/MoMoSettingsPage.php - Settings page → Settings definition: loads defaults
src/Filament/Pages/MoMoSettingsPage.php - Settings page → Settings store: reads/writes global
src/Filament/Pages/MoMoSettingsPage.php - Credential config → Settings store: reads credentials
src/Services/MoMoConfiguration.php - Service provider → Package config: merges config
src/MoMoPaymentServiceProvider.php - Service provider → Settings definition: registers definition
src/MoMoPaymentServiceProvider.php - Service provider → Credential config: binds service
src/MoMoPaymentServiceProvider.php - Credential config → Package config: selects endpoints
src/Services/MoMoConfiguration.php - Settings definition → Settings store: defines encrypted fields
src/Settings/MoMoSettingsDefinition.php - Laravel application → Payment service: checks transactions
README.md - Laravel application → Payment service: verifies IPN
README.md