PHPackages                             mainul/shurjopay-laravel - 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. mainul/shurjopay-laravel

ActivePackage[Payment Processing](/categories/payments)

mainul/shurjopay-laravel
========================

A package for handling ShurjoPay payment gateway in Laravel applications.

06PHP

Since Jul 2Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Mainul12501/shurjopay-laravel)[ Packagist](https://packagist.org/packages/mainul/shurjopay-laravel)[ RSS](/packages/mainul-shurjopay-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

ShurjoPay-Laravel 💳
===================

[](#shurjopay-laravel-)

> A package for handling ShurjoPay payment gateway in Laravel applications

Laravel-ShurjoPay is a package for handling ShurjoPay payment gateway easily in Laravel applications. It has some advantages over the package provided by ShurjoPay and is much more configurable and well-structured.

##### Key differences with the official package

[](#key-differences-with-the-official-package)

- Auto discovery for Laravel 5.5+ projects. 🔍
- Uses **Guzzle** instead of cURL by default.

#### Requirements

[](#requirements)

- PHP &gt;= 7.2
- Laravel &gt;= 6.0

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

[](#installation)

To install the package run

```
composer require mainul/shurjopay-laravel

```

Publish
-------

[](#publish)

To publish the config file, run the following command

```
php artisan vendor:publish --tag=ma-config

```

Environment Variables (Optional)
--------------------------------

[](#environment-variables-optional)

ShurjoPay would provide you some credentials, define them in your `.env` file:

```
SHURJOPAY_SERVER_URL=
MERCHANT_USERNAME=
MERCHANT_PASSWORD=
MERCHANT_KEY_PREFIX=
```

Usage
-----

[](#usage)

The usage of the package is simple. First import the `mainul\ShurjoPay\ShurjoPayService` class.

```
use mainul\ShurjoPay\ShurjoPayService;
```

Now add this line of code in your method where you want to call shurjoPay Payment Gateway. You can use any code segment of below

```
$shurjopay = new ShurjopayService();
$tx_id = $shurjopay->generateTxId();
$success_route = route('Your route'); //This is your custom route where you want to back after completing the transaction.
$data= [
	'amount'=>$request->total_amount, // Your order total amount
	'custom1'=>$request->user_name, // Custom data like User Name
	'custom2'=>$request->email, // Custom data like User Email
	'custom3'=>$request->phone, // Custom data like User Phone Number
	'custom4'=>$request->address, // Custom data like user address
	'is_emi'=>0 //0 No EMI 1 EMI active
];
$shurjopay->sendPayment($data, $success_route);
```

...and call the `generateTxnId()` and `sendPayment()` method.

```
$shurjopay->generateTxnId(); // Pass any string to set your own unique id
$shurjopay->makePayment();
```

That's it! After successful or failed attempt it will redirect to the route you provided along with ShurjoPay response parameters.

Note: if you are using laravel version &lt;8.x, then you may get this error `route('shurjopay.response') not define.`To fix this issue, just copt this route in your `routes/api.php` file. `Route::post('/response', 'mainul\Shurjopay\ShurjopayController@response')->name('shurjopay.response');`

Now Test your application and oversees the response and interaction.

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity29

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/5ff09c9d3ceaf957dae0f365749477680c0eb6d8d7ada9bcc266e3d4b53552a0?d=identicon)[Mainul12501](/maintainers/Mainul12501)

---

Top Contributors

[![Mainul12501](https://avatars.githubusercontent.com/u/45430222?v=4)](https://github.com/Mainul12501 "Mainul12501 (5 commits)")

### Embed Badge

![Health badge](/badges/mainul-shurjopay-laravel/health.svg)

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

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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