PHPackages                             smronju/laravel-sslcommerz - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. smronju/laravel-sslcommerz

ActiveLibrary

smronju/laravel-sslcommerz
==========================

Laravel SSLCommerz is a super easy package to integrate SSLCommerz on Laravel websites.

v1.0.0(1mo ago)023↑2639.1%MITPHPPHP ^8.2||^8.3||^8.4CI passing

Since Mar 27Pushed 1mo agoCompare

[ Source](https://github.com/smronju/laravel-sslcommerz)[ Packagist](https://packagist.org/packages/smronju/laravel-sslcommerz)[ Docs](https://github.com/smronju/laravel-sslcommerz)[ GitHub Sponsors](https://github.com/smronju)[ RSS](/packages/smronju-laravel-sslcommerz/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (10)Versions (2)Used By (0)

 [![Laravel SSLCommerz Package](/art/banner.png)](/art/banner.png)

Laravel SSLCommerz
==================

[](#laravel-sslcommerz)

[![Latest Version on Packagist](https://camo.githubusercontent.com/6829b357c3adb29c78efe7024ed04f8f16222d502bb6664427214ee50d57c2df/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736d726f6e6a752f6c61726176656c2d73736c636f6d6d65727a2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/smronju/laravel-sslcommerz)[![GitHub Tests Action Status](https://camo.githubusercontent.com/5c66adc3e96a912cf783b934d30a4bc96cf366f6d1b46969c06adf3bb73d8b24/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f736d726f6e6a752f6c61726176656c2d73736c636f6d6d65727a2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/smronju/laravel-sslcommerz/actions?query=workflow%3Arun-tests+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/d0454612d1c9b9267d281a8fa7a90831d662919878d6d29da3d370ca8435465f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736d726f6e6a752f6c61726176656c2d73736c636f6d6d65727a2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/smronju/laravel-sslcommerz)[![License](https://camo.githubusercontent.com/a3212e5a7c553df497a20770a631d98f7de5743f25bbffc790568855bfda3e3d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f736d726f6e6a752f6c61726176656c2d73736c636f6d6d65727a3f7374796c653d666c61742d737175617265)](https://github.com/smronju/laravel-sslcommerz/blob/main/LICENSE.md)

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
------------------------

[](#-quick-start-in-3-steps)

### 1. Install via Composer

[](#1-install-via-composer)

```
composer require smronju/laravel-sslcommerz
```

### 2. Configure Your Environment

[](#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

[](#-how-to-get-sandbox-credentials)

SSLCommerz credentials are required to use this package. You can get sandbox credentials by following these steps:

1. **Create Sandbox Account**: Visit the  page to create an account.
2. **Obtain Credentials:** After registration, you will receive your **Store ID** and **Store Password** via email or from the SSLCommerz dashboard.
3. **Set Up in .env:** Copy these credentials and paste them into your `.env` file as shown in the [Configuration](#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 &amp; Publish (Optional)

[](#3-initialize--publish-optional)

This will publish the configuration file to `config/sslcommerz.php`:

```
php artisan laravel-sslcommerz:install
```

---

💡 Simple Usage
--------------

[](#-simple-usage)

### 💳 Initiate a Payment

[](#-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

[](#-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
-------------------

[](#-advanced-features)

### Handling Callbacks

[](#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 &amp; Status Checks

[](#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
----------------------

[](#-features-at-a-glance)

- ✅ **PHP 8.2+** &amp; **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
---------------

[](#-documentation)

For detailed guides on dynamic parameters, IPN handling, and advanced configurations, visit the [Documentation Wiki](https://github.com/smronju/laravel-sslcommerz/wiki).

Credits
-------

[](#credits)

- [Mohammad Shoriful Islam Ronju](https://github.com/smronju)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance90

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

46d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/465434?v=4)[Mohammad Shoriful Islam Ronju](/maintainers/smronju)[@smronju](https://github.com/smronju)

---

Top Contributors

[![smronju](https://avatars.githubusercontent.com/u/465434?v=4)](https://github.com/smronju "smronju (16 commits)")

---

Tags

laravelpayment gatewaysslcommerzlaravel-sslcommerz

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/smronju-laravel-sslcommerz/health.svg)

```
[![Health](https://phpackages.com/badges/smronju-laravel-sslcommerz/health.svg)](https://phpackages.com/packages/smronju-laravel-sslcommerz)
```

###  Alternatives

[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[ralphjsmit/laravel-glide

Auto-magically generate responsive images from static image files.

4719.6k5](/packages/ralphjsmit-laravel-glide)[simplestats-io/laravel-client

Client for SimpleStats!

4515.5k](/packages/simplestats-io-laravel-client)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

3786.5k](/packages/harris21-laravel-fuse)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
