fahipaydev/gateway-laravel
Laravel 13+ integration for the FahiPay payment gateway (Maldives). Create and query transactions, handle redirects and callbacks, verify signatures, track payments via migrations/models, and use events/facades. Includes test mode and install artisan command.
PaymentCreated, PaymentSucceeded), enabling integration with Laravel’s event system for asynchronous workflows (e.g., notifications, inventory updates).FahiPay), adhering to Laravel’s service container patterns. Facilitates future swapping of payment gateways if needed.FahiPayTransaction) for persistence, but assumes a default Laravel database setup. Custom schemas or multi-tenancy may require adjustments.composer require fahipaydev/gateway-laravel..env with merchant credentials (API key, callback URL).FahiPayTransactionCreated events to trigger notifications or inventory updates.EnsureFahiPayCallback) for callback validation.App\Services\FahiPay)./payment/callback) with existing endpoints.FahiPayTransaction model if using non-standard schemas (e.g., PostgreSQL JSONB).transaction_id)./fahipay/callback).composer.json to avoid compatibility issues..env with clear documentation for deployments.FahiPayTransaction model’s response field).fahi_pay_transactions table by date if volume exceeds 1M records/month.sync queue driver for high-volume callbacks).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| FahiPay API downtime | Payment failures | Implement retry logic with circuit breaker (e.g., Spatie’s Laravel Retryable). |
| Callback URL unreachable | Unprocessed payments | Use a reliable callback endpoint (e.g., AWS Lambda with dead-letter queues). |
| Malicious callback spoofing | Fraudulent transactions | Validate callbacks with HMAC (extend package or use middleware). |
| Database corruption | Lost transaction records | Enable Laravel’s database backups and use migrations for schema changes. |
| Currency/multi-tenancy unsupported | Regional restrictions | Build abstraction layer to support future gateways. |
FahiPay, FahiPayTransaction) and their methods.How can I help you explore Laravel packages today?