smronju/laravel-sslcommerz
Composer 安装命令:
composer require smronju/laravel-sslcommerz
包简介
Laravel SSLCommerz is a super easy package to integrate SSLCommerz on Laravel websites.
README 文档
README
Laravel SSLCommerz
Integrate SSLCommerz into your Laravel application in minutes. This package provides a clean, fluent API to handle payments, validations, and refunds with zero hassle.
🚀 Quick Start in 3 Steps
1. Install via Composer
composer require smronju/laravel-sslcommerz
2. Configure Your Environment
Add your credentials to your .env file:
SSLCOMMERZ_STORE_ID=your_id SSLCOMMERZ_STORE_PASSWORD=your_password SSLCOMMERZ_STORE_CURRENCY=BDT # Optional (default: BDT) SSLCOMMERZ_SANDBOX=true # Set false for production (default: true)
✨ How to get sandbox credentials
SSLCommerz credentials are required to use this package. You can get sandbox credentials by following these steps:
-
Create Sandbox Account: Visit the https://developer.sslcommerz.com/registration/ page to create an account.
-
Obtain Credentials: After registration, you will receive your Store ID and Store Password via email or from the SSLCommerz dashboard.
-
Set Up in .env: Copy these credentials and paste them into your
.envfile as shown in the Configuration step.
Important
Sandbox credentials are for testing purposes only. You should replace them with your live credentials and change SANDBOX=false before deploying to production.
3. Initialize & Publish (Optional)
This will publish the configuration file to config/sslcommerz.php:
php artisan laravel-sslcommerz:install
💡 Simple Usage
💳 Initiate a Payment
The package uses a fluent interface to prepare and trigger the payment.
use Smronju\Sslcommerz\Facades\Sslcommerz; $response = Sslcommerz::setOrder($amount, $invoiceId, $productName) ->setCustomer($name, $email, $phone) ->makePayment(); if ($response->success()) { return redirect($response->gatewayPageURL()); }
✅ Validate Payment
Simply pass the request data and expected transaction details.
$isValid = Sslcommerz::validatePayment($request->all(), $transactionId, $amount); if ($isValid) { // Save to database, update status, etc. }
🛠 Advanced Features
Handling Callbacks
Define your routes in routes/web.php:
Route::post('/sslcommerz/success', [SslcommerzController::class, 'success'])->name('sslcommerz.success'); Route::post('/sslcommerz/failure', [SslcommerzController::class, 'failure'])->name('sslcommerz.failure');
Refunds & Status Checks
// Request a refund $refund = Sslcommerz::refundPayment($bankTranId, $amount, "Customer requested refund"); // Check refund status $status = Sslcommerz::checkRefundStatus($refundRefId);
🔥 Features at a Glance
- ✅ PHP 8.2+ & Laravel 12-13 support.
- 🛠 Fluent API: Ready-to-use methods for customer info, shipping info, etc.
- 🔒 Secure: In-built hash verification and data validation.
- 📦 Zero Config: Works out of the box with sensible defaults.
- 🧪 Sandbox Ready: Easy toggle between sandbox and live environments.
📖 Documentation
For detailed guides on dynamic parameters, IPN handling, and advanced configurations, visit the Documentation Wiki.
Credits
License
The MIT License (MIT). Please see License File for more information.
smronju/laravel-sslcommerz 适用场景与选型建议
smronju/laravel-sslcommerz 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 29 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 03 月 27 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「payment-gateway」 「sslcommerz」 「laravel-sslcommerz」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 smronju/laravel-sslcommerz 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 smronju/laravel-sslcommerz 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 smronju/laravel-sslcommerz 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Client SDK for CyberSource REST APIs
SSLCommerz Laravel is a super easy package to integrate SSLCommerz on Laravel websites.
Laravel library for SSLCommerz payment gateway
Alfabank REST API integration
A package for SSLCommerz Payment Gateway. Inspired by https://github.com/sslcommerz/SSLCommerz-Laravel
Laravel sslcommerz payment package
统计信息
- 总下载量: 29
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 23
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-27
