Louis Innovations releases a comprehensive Laravel package for SADAD Payment Gateway integration, built following Laravel conventions and best practices.
Why Laravel?
Laravel is the most popular PHP framework in Qatar's development community. From government portals to e-commerce platforms, Laravel powers critical business applications across the GCC. Our package integrates SADAD payments the Laravel way.
Package Architecture:
Sadad Facade - Clean, expressive API through a Laravel Facade. Call Sadad::checkout(), Sadad::invoice(), or Sadad::refund() from anywhere in your application. Mockable for testing.
Service Provider - Auto-discovered service provider that registers SADAD services, publishes configuration, and sets up event listeners. Zero manual setup after installation.
Configuration - Publish and customize the config file. Support for multiple SADAD merchant accounts. Environment-specific credentials through .env files.
Events and Listeners - PaymentCompleted, PaymentFailed, InvoicePaid, RefundProcessed events fired automatically. Build notification systems, update order status, or trigger business logic through standard Laravel event listeners.
Middleware - VerifySadadWebhook middleware validates webhook signatures. SadadSessionCheck middleware ensures checkout sessions are valid. Apply to routes or route groups.
Artisan Commands - sadad:status checks API connectivity. sadad:refund processes refunds from the command line. sadad:invoice-remind sends payment reminders for unpaid invoices.
Database Migrations - Optional migrations for tracking payments, invoices, and refunds locally. Polymorphic relationships connect payments to any model (Order, Subscription, Invoice).
Blade Components - Optional Blade components for checkout buttons and payment status displays. Works with Livewire for real-time updates.
Testing Support - Fake SADAD responses for feature tests. Factory classes for generating test payment data. Assertions for verifying payment operations.
Repository: github.com/louisinnovationsqatar/sadad-laravel
Built for the Laravel community in Qatar and across the GCC.

