PHPackages                             afzalsabbir/sslaracommerz - 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. [Payment Processing](/categories/payments)
4. /
5. afzalsabbir/sslaracommerz

ActiveLibrary[Payment Processing](/categories/payments)

afzalsabbir/sslaracommerz
=========================

A package for SSLCommerz Payment Gateway. Inspired by https://github.com/sslcommerz/SSLCommerz-Laravel

v0.0.1-alpha-1(3y ago)221024MITPHPPHP ^7.1.3|^8.0

Since Sep 11Pushed 3y ago6 watchersCompare

[ Source](https://github.com/AfzalSabbir/sslaracommerz)[ Packagist](https://packagist.org/packages/afzalsabbir/sslaracommerz)[ RSS](/packages/afzalsabbir-sslaracommerz/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (2)Dependencies (7)Versions (3)Used By (0)

SSLaraCommerz - Laravel Package
===============================

[](#sslaracommerz---laravel-package)

> A package for SSLCommerz Payment Gateway
> Inspired by [SSLCommerz](https://github.com/sslcommerz/SSLCommerz-Laravel)
> [SSLCommerz](https://www.sslcommerz.com) Payment gateway library for Laravel framework. Official documentation is [here](https://developer.sslcommerz.com/docs.html).

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Latest Version on Packagist](https://camo.githubusercontent.com/fa5eb423f91d230fdbf89fe19a70646d9799aef77a6d0edf9cfafc902b41bb2a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61667a616c7361626269722f73736c617261636f6d6d65727a2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/afzalsabbir/sslaracommerz)[![Build Status](https://camo.githubusercontent.com/9b35644bb9e9463936a6185482a8fd8cf733a35fcbbcbff72921e2e8fe6715e1/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f61667a616c7361626269722f73736c617261636f6d6d65727a2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/afzalsabbir/sslaracommerz)[![Quality Score](https://camo.githubusercontent.com/2267f44722de76ca347da265a66e059ed5eaf9cdf7eb4cc262054df54a67a3b9/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f61667a616c7361626269722f73736c617261636f6d6d65727a2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/afzalsabbir/sslaracommerz)![Commits Since](https://camo.githubusercontent.com/ab78cf2f3edb0150c1b3c1a96b9fd40764aa6374de668459759037dead049c1a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6d6d6974732d73696e63652f61667a616c7361626269722f73736c617261636f6d6d65727a2f76302e302e312d616c7068612d302e7376673f7374796c653d666c61742d737175617265)

![GitHub contributors](https://camo.githubusercontent.com/0e58a9cc43f8feb8a660822612dec0f8c6420dff9b50032684159d4123024b82/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f61667a616c7361626269722f73736c617261636f6d6d65727a2e7376673f7374796c653d666c61742d737175617265)![GitHub issues](https://camo.githubusercontent.com/8566250e9e514d382ba7a7441fefeb0dff68439170cb9ec7e997564f53b114b7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f61667a616c7361626269722f73736c617261636f6d6d65727a2e7376673f7374796c653d666c61742d737175617265)![GitHub issues](https://camo.githubusercontent.com/c166a0a3a20f607e01958e58a71dd93dc57100641960b90efd378569bb2e745e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d636c6f7365642f61667a616c7361626269722f73736c617261636f6d6d65727a2e7376673f7374796c653d666c61742d737175617265)

![GitHub forks](https://camo.githubusercontent.com/3f334b69fc6956150d9344e06890058fabe455af6806d703800e03917dcd1499/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f61667a616c7361626269722f73736c617261636f6d6d65727a2e7376673f7374796c653d666c61742d737175617265)![GitHub stars](https://camo.githubusercontent.com/c3486df5763b004205b9268321fafd76d80f37e98d1c5b3cf81885599df44a27/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f61667a616c7361626269722f73736c617261636f6d6d65727a2e7376673f7374796c653d666c61742d737175617265)![GitHub watchers](https://camo.githubusercontent.com/a6e85c49ffd4b9d854d667a3e984a20be07713ef6680d008247ed8950c825229/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f77617463686572732f61667a616c7361626269722f73736c617261636f6d6d65727a2e7376673f7374796c653d736f6369616c266c6162656c3d5761746368)![GitHub followers](https://camo.githubusercontent.com/897439f35c4c7e0eafbbeaa7deeec064cac341e2618a5e669cbfb6b69a76daac/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f6c6c6f776572732f61667a616c7361626269722e7376673f7374796c653d736f6369616c266c6162656c3d466f6c6c6f77)![Twitter Follow](https://camo.githubusercontent.com/402732baf6fa319227e0cbe111a5f52cdf99c3c8f7126162919abc6ec00407a9/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f61667a616c7361626269722e7376673f7374796c653d736f6369616c)

[![Total Downloads](https://camo.githubusercontent.com/3a50bf1a92bc94456525a1d53cfbebe1791a4b804c378b31817a6921dff401e9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61667a616c7361626269722f73736c617261636f6d6d65727a2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/afzalsabbir/sslaracommerz)![GitHub code size in bytes](https://camo.githubusercontent.com/4d89e0e80872fae9af8883cc496052f6e5236f27779172690684062ce9281067/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f61667a616c7361626269722f73736c617261636f6d6d65727a2e7376673f7374796c653d666c61742d737175617265)![GitHub repo size in bytes](https://camo.githubusercontent.com/aeb6cc118220bae2e6d1e7f850cb93a1a85f03e5b8f43c21765b8b542efab8a4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7265706f2d73697a652f61667a616c7361626269722f73736c617261636f6d6d65727a2e7376673f7374796c653d666c61742d737175617265)

![GitHub last commit](https://camo.githubusercontent.com/e8c71ee9448a30aa43819dffaa594281fc26286dabbd61e35161abc5bac525d1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f61667a616c7361626269722f73736c617261636f6d6d65727a2e7376673f7374796c653d666c61742d737175617265)![GitHub commit activity the past week, 4 weeks, year](https://camo.githubusercontent.com/2dca31cee59bf7b501c72689bd63c5518209ea7c39a5760c185a3d4bcb9d0d4a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6d6d69742d61637469766974792f792f61667a616c7361626269722f73736c617261636f6d6d65727a2e7376673f7374796c653d666c61742d737175617265)![GitHub commit activity the past week, 4 weeks, year](https://camo.githubusercontent.com/2f4b8a1f8b71e6b84b060098115e871963d56360cd0b7f01ef6ec20da3a98962/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6d6d69742d61637469766974792f6d2f61667a616c7361626269722f73736c617261636f6d6d65727a2e7376673f7374796c653d666c61742d737175617265)![GitHub commit activity the past week, 4 weeks, year](https://camo.githubusercontent.com/ce94a8597bab140b630d8e93feb984d01ad95fe081318dd9d81fe821e48e0086/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6d6d69742d61637469766974792f772f61667a616c7361626269722f73736c617261636f6d6d65727a2e7376673f7374796c653d666c61742d737175617265)

![GitHub release](https://camo.githubusercontent.com/72e8d2d35aab03086a7bc19928dbc00620305e646053711ab158baa464268e3d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f61667a616c7361626269722f73736c617261636f6d6d65727a2e7376673f7374796c653d666c61742d737175617265)![GitHub release date](https://camo.githubusercontent.com/90ff1b83ab99dae83fd10a087466249c37fc161e31ee12d6748c29f54a52d90e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f61667a616c7361626269722f73736c617261636f6d6d65727a2e7376673f7374796c653d666c61742d737175617265)

![GitHub tag](https://camo.githubusercontent.com/ca25831d08913c2de109177410613b34dedd706b598dd3b714d89515119af989/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f61667a616c7361626269722f73736c617261636f6d6d65727a2e7376673f7374796c653d666c61742d737175617265)![GitHub release](https://camo.githubusercontent.com/5d48db24755a24880772a5e4dac066ea10819e770e3cac2f8fbf59426d5e2789/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652d7072652f61667a616c7361626269722f73736c617261636f6d6d65727a2e7376673f7374796c653d666c61742d737175617265)![GitHub release](https://camo.githubusercontent.com/90ff1b83ab99dae83fd10a087466249c37fc161e31ee12d6748c29f54a52d90e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d646174652f61667a616c7361626269722f73736c617261636f6d6d65727a2e7376673f7374796c653d666c61742d737175617265)

**Tags:** Payment Gateway, SSLCommerz, IPN, Laravel, SSLaraCommerz

**Requires:** Laravel &gt;= 5.6 and MySQL

**License:** MIT License

Install
-------

[](#install)

```
composer require afzalsabbir/sslaracommerz
```

Migration
---------

[](#migration)

```
php artisan migrate
```

Instructions
------------

[](#instructions)

### Vendor Publish - *Required*

[](#vendor-publish---required)

```
# Public Assets
php artisan vendor:publish --provider="AfzalSabbir\SSLaraCommerz\SSLaraCommerzServiceProvider" --tag="public-assets"
```

#### **Public Assets**: *To integrate popup checkout, use the below script before the end of body tag.*

[](#public-assets-to-integrate-popup-checkout-use-the-below-script-before-the-end-of-body-tag)

- For Sandbox

    ```

        (function (window, document) {
            var loader = function () {
                var script = document.createElement("script"),
                    tag    = document.getElementsByTagName("script")[0];
                script.src = "https://sandbox.sslcommerz.com/embed.min.js?" + Math.random().toString(36).substring(7);
                tag.parentNode.insertBefore(script, tag);
            };

            window.addEventListener ? window.addEventListener("load", loader, false) : window.attachEvent("onload", loader);
        })(window, document);

    ```

    > or, Publish the [Public Assets](#public-assets) and use the below `sandbox` script

    ```

    ```
- For Live

    ```

        (function (window, document) {
            var loader = function () {
                var script = document.createElement("script"),
                    tag    = document.getElementsByTagName("script")[0];
                script.src = "https://seamless-epay.sslcommerz.com/embed.min.js?" + Math.random().toString(36).substring(7);
                tag.parentNode.insertBefore(script, tag);
            };

            window.addEventListener ? window.addEventListener("load", loader, false) : window.attachEvent("onload", loader);
        })(window, document);

    ```

    > or, Publish the [Public Assets](#public-assets) and use the below `live` script

    ```

    ```

```
# Routes and Controller
php artisan vendor:publish --provider="AfzalSabbir\SSLaraCommerz\SSLaraCommerzServiceProvider" --tag="routes-controller"
```

#### **Routes and Controller**: *To customize the routes and controller, use the below command.*

[](#routes-and-controller-to-customize-the-routes-and-controller-use-the-below-command)

- Add `$this->loadRoutesFrom(base_path('routes/sslcommerz.php'));` in `app/Providers/RouteServiceProvider.php````
    namespace App\Providers;

    // ...

    class RouteServiceProvider extends ServiceProvider
    {
        // ...
        public function boot()
        {
            // ...
            $this->loadRoutesFrom(base_path('routes/sslcommerz.php'));
        }
        // ...
    }
    ```

---

### Vendor Publish - *Optional*

[](#vendor-publish---optional)

```
# Config
php artisan vendor:publish --provider="AfzalSabbir\SSLaraCommerz\SSLaraCommerzServiceProvider" --tag="config"

# Views
## Namespace: sslaracommerz
php artisan vendor:publish --provider="AfzalSabbir\SSLaraCommerz\SSLaraCommerzServiceProvider" --tag="views"

# Migrations
php artisan vendor:publish --provider="AfzalSabbir\SSLaraCommerz\SSLaraCommerzServiceProvider" --tag="migrations"
```

> **Note:** If you later encounter issues with session destroying after redirect, you can set `'same_site' => null,` in your `config/session.php` file.

- **Step 1:** Add `STORE_ID` and `STORE_PASSWORD` values on your project's `.env` file. You can register for a store at
- **Step 2:** Add the below routes into the `$excepts` array of `VerifyCsrfToken` middleware.

    ```
    protected $except = [
        '/pay-via-ajax', '/success','/cancel','/fail','/ipn'
    ];
    ```

Now, let's go to the main integration part.

- **Step 3:** Use the below button where you want to show the **"Pay Now"** button:

    ```
     Pay Now

    ```
- **Step 4:** For EasyCheckout (Popup) integration, you can update the `checkout_ajax.php` or use a different file according to your need. We have provided a basic sample page from where you can kickstart the payment gateway integration.
- **Step 5:** For Hosted Checkout integration, you can update the `checkout_hosted.php` or use a different file according to your need. We have provided a basic sample page from where you can kickstart the payment gateway integration.
- **Step 6:** For redirecting action from SSLCommerz Payment gateway, we have also provided sample `success.php`, `cancel.php`, `fail.php`files. You can update those files according to your need.

Original Documentation
----------------------

[](#original-documentation)

For more clear concept read: [SSLCommerz README.md](https://github.com/sslcommerz/SSLCommerz-Laravel/blob/master/README.md)

Testing
-------

[](#testing)

Run the tests with:

```
vendor/bin/phpunit
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security-related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

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

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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

Every ~118 days

Total

2

Last Release

1221d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fd5b67a41b67fbd3bfd88cdc9c5788cdd039fbb793964e348e2b64e807f6c16a?d=identicon)[afzalsabbir](/maintainers/afzalsabbir)

---

Top Contributors

[![AfzalSabbir](https://avatars.githubusercontent.com/u/39697431?v=4)](https://github.com/AfzalSabbir "AfzalSabbir (45 commits)")

---

Tags

laravelpaymentpayment-gatewayphpsslaracommerzsslcommerzsslcommerz-api-laravelsslcommerz-laravelsslcommerz-paymentsslcommerz-payment-gatewaysslcommerzSSLCommerzBDSSLaraCommerz

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/afzalsabbir-sslaracommerz/health.svg)

```
[![Health](https://phpackages.com/badges/afzalsabbir-sslaracommerz/health.svg)](https://phpackages.com/packages/afzalsabbir-sslaracommerz)
```

###  Alternatives

[lemonsqueezy/laravel

A package to easily integrate your Laravel application with Lemon Squeezy.

58596.1k](/packages/lemonsqueezy-laravel)[tsaiyihua/laravel-linepay

linepay library for laravel

102.9k](/packages/tsaiyihua-laravel-linepay)[digikraaft/laravel-paystack-webhooks

Handle Paystack webhooks in a Laravel application

177.5k1](/packages/digikraaft-laravel-paystack-webhooks)[wandesnet/mercadopago-laravel

PHP SDK for integration with Mercado Pago

252.4k](/packages/wandesnet-mercadopago-laravel)

PHPackages © 2026

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