koderia-creative-lab / laravel-squad
A modern Laravel client and driver for the Squad (HabariPay) payment gateway.
Package info
github.com/Koderia-Creative-Lab/laravel-squad
pkg:composer/koderia-creative-lab/laravel-squad
v1.0.0
2026-11-30 10:53 UTC
Requires
- php: ^8.1|^8.2|^8.3
- illuminate/http: ^9.0|^10.0|^11.0
- illuminate/support: ^9.0|^10.0|^11.0
Requires (Dev)
- mockery/mockery: ^1.4
- orchestra/testbench: ^7.0|^8.0|^9.0
- phpunit/phpunit: ^9.5|^10.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
A modern Laravel client for the Squad (HabariPay) payment gateway supporting automatic sandbox/production routing, transaction initialization, verification, and HMAC SHA-512 webhook signature validation.
Installation
composer require koderia-creative-lab/laravel-squad
Publish configuration:
php artisan vendor:publish --tag="squad-config"
Configuration
Set the following environment variables in .env:
SQUAD_SECRET_KEY=your_secret_key SQUAD_ENV=sandbox SQUAD_REDIRECT_URL=https://your-app.com/payment/callback SQUAD_SPLIT_MODE=false SQUAD_TIMEOUT=30 SQUAD_LOGGING=true
Usage
Initialize a Transaction
use Koderia\Squad\Facades\Squad; $response = Squad::initialize([ 'amount' => 1500000, // in kobo (₦15,000) 'email' => 'customer@example.com', 'transaction_ref' => 'UNIQUE_TX_REF', 'customer_name' => 'Ada Lovelace', 'metadata' => ['order_id' => 102], ]); if ($response->isSuccessful()) { return redirect($response->getCheckoutUrl()); } $error = $response->getErrorMessage();
Verify a Transaction
use Koderia\Squad\Facades\Squad; $verification = Squad::verify($reference); if ($verification->isPaid()) { $amount = $verification->getAmount(); $meta = $verification->getMetaData(); }
Validate Webhook Signatures
use Koderia\Squad\Facades\Squad; $isValid = Squad::verifyWebhookSignature( $request->getContent(), (string) $request->header('x-squad-encrypted-body') );
Testing
vendor/bin/phpunit