PHPackages                             jagdish-j-p/sbi-pay - 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. jagdish-j-p/sbi-pay

ActiveLibrary[Payment Processing](/categories/payments)

jagdish-j-p/sbi-pay
===================

A laravel implementation for SBI payment service

v1.0.0(3y ago)6533[1 issues](https://github.com/Jagdish-J-P/sbi-pay/issues)[1 PRs](https://github.com/Jagdish-J-P/sbi-pay/pulls)MITPHPPHP ^7.3 || ^8.0CI passing

Since Jul 1Pushed 1y ago2 watchersCompare

[ Source](https://github.com/Jagdish-J-P/sbi-pay)[ Packagist](https://packagist.org/packages/jagdish-j-p/sbi-pay)[ Docs](https://github.com/jagdish-j-p/sbi-pay)[ Fund](https://paypal.me/jagdishjptl)[ Fund](https://www.buymeacoffee.com/jagdish.j.ptl)[ RSS](/packages/jagdish-j-p-sbi-pay/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (3)Used By (0)

SBI E Pay Integration in Laravel
================================

[](#sbi-e-pay-integration-in-laravel)

This package provides laravel implementations for SBI Payment Gateway services.

Become a sponsor
----------------

[](#become-a-sponsor)

[![](.github/assets/support.png)](https://github.com/sponsors/Jagdish-J-P)

Your support allows me to keep this package free, up-to-date and maintainable. Alternatively, you can **[spread the word!](http://twitter.com/share?text=I+am+using+this+cool+PHP+package+to+integrate+sbi+payment+gateway&url=https://github.com/jagdish-j-p/sbi-pay&hashtags=PHP,Laravel,SBIEPay)**

Important Notes
---------------

[](#important-notes)

1. Your Production / Stagging server ip and domain must be whitelisted by SBI to start integration. Otherwise their Test URL will not be accessible.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require jagdish-j-p/sbi-pay
```

Then run the publish command to publish the config files and other supported files

```
php artisan sbi-pay:publish
```

This will generate the following files

- The config file with default setup for you to override `sbipay.php`
- The controller that will receive payment response and any host-to-host events `app/Http/Controllers/SBIPay/Controller.php`
- The assets in public directory.
- The view file with default html for you to override `payment.blade.php`. Note do not change form action URL `sbi-pay.payment.auth.request`.

Set-Up
------

[](#set-up)

1. Add your redirect urls and your Credentials provided by SBI to the `.env` file.

```
SBIEPAY_ACCOUNT_IDENTIFIER=NEFT
SBIEPAY_AGGREGATOR_ID=SBIEPAY
SBIEPAY_MERCHANT_ID=
SBIEPAY_MERCHANT_KEY=

SBIEPAY_SUCCESS_PATH="sbi-pay/payment/success"
SBIEPAY_FAIL_PATH="sbi-pay/payment/fail"

SBIEPAY_SUCCESS_URL="${APP_URL}/${SBIEPAY_SUCCESS_PATH}"
SBIEPAY_FAIL_URL="${APP_URL}/${SBIEPAY_FAIL_PATH}"
```

You can override the defaults by updating the config file.

Usage
-----

[](#usage)

1. You can visit [](https://app.test/sbi-pay/initiate/payment) for the payment flow demo of web integration. You can override below function defined in `app/Http/Controllers/SBIPay/Controller.php` as per your requirement.

```
    /**
     * @param Request $request
     * @param mixed $order_no
     * @param mixed $amount
     * @param mixed $remark
     *
     * @return string
     */
    public function initiate(Request $request, $order_no = null, $amount = null, $remark = null)
    {
        return view('SBIPay::payment', compact(['order_no', 'amount', 'remark']));
    }
```

You can also override `payment.blade.php` with your custom design to integrate with your layout. but do not change `name` attribute of html controls and `action` URL of form.

2. Handle the payment response in `app/Http/Controllers/SBIPay/Controller.php`

```
    /**
     * Handles payment success response
     * @param Request $request
     *
     * @return Response
     */
    public function success(Request $request)
    {
        $response = $request->handle();

        // Update your order status
    }

    /**
     * Handles payment fail response
     * @param Request $request
     *
     * @return string
     */
    public function fail(Request $request)
    {
        $response = $request->handle();

        // Update your order status

        return 'OK';
    }

    /**
     * Handles server-to-server communication
     * @param Request $request
     *
     * @return string
     */
    public function webhook(Request $request)
    {
        $response = $request->handle();

        // Update your order status

        return 'OK';
    }
```

3. View Transaction Status

```
https://app.test/sbi-pay/transaction/status/$sbi_transaction_id/$merchant_order_no

```

4. Check transaction status or Initiate Refund from Controller

```
use JagdishJP\SBIPay\Facades\SBIPay;

/**
 * Returns status of transaction
 *
 * @param string $sbi_transaction_id sbi transaction id
 * @param string $merchant_order_no  merchant order no
 * @return array
 */
$status = SBIPay::transactionStatus($sbi_transaction_id, $merchant_order_no);

/**
 * Initiates refund for any transaction
 *
 * @param string $sbi_transaction_id sbi transaction id
 * @param string $refund_order_no    refund order no
 * @param string $amount             amount to refund partial/full
 * @param string $merchant_order_no  merchant order no
 * @return array
 */
$banks = SBIPay::initiateRefund($sbi_transaction_id, $refund_order_no, $amount, $merchant_order_no);
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

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.

Credits
-------

[](#credits)

- [Jagdish-J-P](https://github.com/jagdish-j-p)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 56.5% 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

1412d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4e7c021b8f19406056e9a24ec8d268cec00f1a9d77bd72d8cc5cb0a6fbc6a178?d=identicon)[Jagdish-J-P](/maintainers/Jagdish-J-P)

---

Top Contributors

[![hksofttronix](https://avatars.githubusercontent.com/u/78477510?v=4)](https://github.com/hksofttronix "hksofttronix (87 commits)")[![Jagdish-J-P](https://avatars.githubusercontent.com/u/20887370?v=4)](https://github.com/Jagdish-J-P "Jagdish-J-P (34 commits)")[![actions-user](https://avatars.githubusercontent.com/u/65916846?v=4)](https://github.com/actions-user "actions-user (23 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (10 commits)")

---

Tags

jagdish-j-pSBISBI Payment GatewaySBI Paysbi-paymentState Bank of India Payment Gateway

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jagdish-j-p-sbi-pay/health.svg)

```
[![Health](https://phpackages.com/badges/jagdish-j-p-sbi-pay/health.svg)](https://phpackages.com/packages/jagdish-j-p-sbi-pay)
```

###  Alternatives

[lemonsqueezy/laravel

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

58596.1k](/packages/lemonsqueezy-laravel)[ssheduardo/redsys-laravel

Package redsys for laravel

100129.5k1](/packages/ssheduardo-redsys-laravel)[duncanmcclean/simple-commerce

A simple, yet powerful e-commerce addon for Statamic.

16313.2k2](/packages/duncanmcclean-simple-commerce)[tsaiyihua/laravel-ecpay

ecpay library for laravel

6416.3k](/packages/tsaiyihua-laravel-ecpay)[alifaraun/laravel-moamalat-pay

Easy - Moamalat Lightbox integration for Laravel.

1914.0k](/packages/alifaraun-laravel-moamalat-pay)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

322.8k](/packages/duncanmcclean-statamic-cargo)

PHPackages © 2026

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