majidgaravand / novinopay
Laravel payment gateway package
v1.0.0
2026-01-06 11:20 UTC
Requires
- php: ^7.2|^8.0
- laravel/framework: ^7.0|^8.0|^9.0|^10.0|^11.0|^12.0
README
A clean and lightweight Laravel package for integrating NovinoPay payment gateway into your application.
Installation
Install via Composer:
composer require majidgaravand/novinopay
Configuration
Publish the configuration file:
php artisan vendor:publish --tag=novinopay-config
Set your credentials in .env:
NOVINOPAY_MERCHANT_ID=your_merchant_id
NOVINOPAY_CALLBACK_URL=https://your-domain.com/payment/callback
NOVINOPAY_SANDBOX=false
Usage
Request a Payment
use NovinoPay;
$result = NovinoPay()
->merchantId(YOUR_MERCHANT_CODE)
->amount(AMOUNT_IN_IRT)
->request()
->description($description)
->callbackUrl($callbackUrl)
->mobile($mobile)
->email($email)
->send();
if ($result->success()) {
// Redirect user to payment gateway
} else {
echo $result->message();
}
Verify a Payment
use NovinoPay;
$result = NovinoPay()
->merchantId(YOUR_MERCHANT_CODE)
->amount(AMOUNT_IN_IRT)
->verification()
->authority($authority)
->send();
if ($result->success()) {
// Payment verified successfully
} else {
echo $result->message();
}
Error Handling
Each response returns:
$result->success(); // boolean
$result->code(); // int
$result->message(); // string (Persian)
Error messages are mapped internally based on NovinoPay documentation.
Laravel Compatibility
- Laravel 9.x ✅
- Laravel 10.x ✅
- Laravel 11.x ✅
License
This package is open-sourced software licensed under the MIT License.
Author
Majid Azad
Laravel Backend Developer