sofizpay-laravel maintained by oussamamadjmaa
Description
A Laravel wrapper for the SofizPay API — CIB card payments and prepaid service operations (phone, internet, game recharge, bill payments) for Algeria, with typed DTOs, response objects, and built-in sandbox mocking.
Author
Last update
2026/07/21 00:15
(dev-main)
License
Downloads
9
Tags
php - payment - sdk - laravel - payment-gateway - api-wrapper - dz - recharge - ooredoo - algeria - cib - sofizpay - cib-payment - carte-interbancaire - mobile-recharge - phone-recharge - internet-recharge - bill-payment - sonelgaz - algerie-telecom - mobilis - djezzy - idoom
SofizPay for Laravel
A Laravel package for SofizPay CIB transactions and service operations. It provides DTOs for phone, internet, game, and bill operations, plus typed response objects.
Requirements
- PHP 8.1 or later
- Laravel 10, 11, 12, or 13
Installation
composer require oussamamadjmaa/sofizpay-laravel
The package is discovered automatically. Publish its configuration when you need to set values in a config file:
php artisan vendor:publish --provider="OussamaMadjmaa\SofizPay\SofizPayServiceProvider" --tag=config
Set the required environment variables:
SOFIZPAY_ACCOUNT_ID=
SOFIZPAY_ENCRYPTED_SK=
SOFIZPAY_SANDBOX=true
Quick start
use OussamaMadjmaa\SofizPay\DTOs\MakeCIBTransactionDTO;
use OussamaMadjmaa\SofizPay\SofizPay;
$payment = app(SofizPay::class)->cibTransaction()->make(
new MakeCIBTransactionDTO(
amount: 2500,
fullName: 'Oussama Madjmaa',
phone: '0555123456',
email: 'oussama@example.com',
returnUrl: 'https://example.com/payments/return',
),
);
return redirect()->away($payment->paymentUrl);
You may also use the OussamaMadjmaa\SofizPay\Facades\SofizPay facade.
Documentation
- Installation
- Configuration
- CIB transactions
- Service operations
- Sandbox behavior
- Error handling
- Architecture
Security
Please report vulnerabilities according to our security policy.
Contributing
Contributions are welcome. Read CONTRIBUTING.md and CODE_OF_CONDUCT.md first.
License
SofizPay for Laravel is open-sourced software licensed under the MIT license.