PHPackages                             thetestcoder/laravel-razorpay - 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. thetestcoder/laravel-razorpay

ActiveLibrary[Payment Processing](/categories/payments)

thetestcoder/laravel-razorpay
=============================

This is simple laravel package structure

1.0.0(5y ago)113MITPHPPHP ^7.4|^8.0

Since Feb 18Pushed 5y ago1 watchersCompare

[ Source](https://github.com/thetestcoder/laravel-razorpay)[ Packagist](https://packagist.org/packages/thetestcoder/laravel-razorpay)[ Docs](https://github.com/thetestcoder/laravel-razorpay)[ Fund](https://github.com/thetestcoder)[ GitHub Sponsors](https://github.com/thetestcoder)[ RSS](/packages/thetestcoder-laravel-razorpay/feed)WikiDiscussions master Synced 1mo ago

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

Project Info
============

[](#project-info)

Budge Goes Here
---------------

[](#budge-goes-here)

[![Latest Version on Packagist](https://camo.githubusercontent.com/79aa75b02853498a09ee69de23c7444aa849e9d345ee6a4ab52ad89f9234aff0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74686574657374636f6465722f6c61726176656c2d72617a6f727061792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/thetestcoder/laravel-razorpay)[![Build Status](https://camo.githubusercontent.com/915f0bfac0239b9eb35789cd7a160f880766c111e0546d40f5ec1fb09c26b3e3/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f74686574657374636f6465722f6c61726176656c2d72617a6f727061792f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/thetestcoder/laravel-razorpay)[![Quality Score](https://camo.githubusercontent.com/7f5d18a74006797270807990d585cc27ae59f70801e1698e32404eaa51209818/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f74686574657374636f6465722f6c61726176656c2d72617a6f727061792e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/thetestcoder/laravel-razorpay)[![Total Downloads](https://camo.githubusercontent.com/4d933d461b1ab00c0d306b47465f4c0161ff031e0bed24517e68f5a62a548e0a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f74686574657374636f6465722f6c61726176656c2d72617a6f727061792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/thetestcoder/laravel-razorpay)

> This package is under development so please use at your own risk

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

[](#installation)

You can install the package via composer:

```
composer require thetestcoder/laravel-razorpay
```

Usage
-----

[](#usage)

```
RAZORPAY_API_KEY=your-api-key
RAZORPAY_API_SECRET=your-api-secret
```

### In Blade file

[](#in-blade-file)

```
 {!! \TheTestCoder\LaravelRazorpay\LaravelRazorpayFacade::paymentButton(
    1000,
    "Pay 10 Rupees",
    "The Test Coder",
    "Order Value From Test Coder"
    )
     !!}

  // or

  {{ \TheTestCoder\LaravelRazorpay\LaravelRazorpayFacade::paymentButton(
        1000,
        "Pay 10 Rupees",
        "The Test Coder",
        "Order Value From Test Coder"
        [$id] # extra params for routes
        )
    }}
```

### Routes

[](#routes)

```
Route::get('pay', 'YourController@payView')->name('pay.view');

// Payment Request
Route::post('payment', 'YourController@payment')->name('payment'); // if you change name('your custom name')

// please add extra .env value ===>  RAZORPAY_PAYMENT_ROUTE_NAME=your-route-name

// or

Route::post('payment/{param}', 'YourController@payment')->name('payment');
```

### YourController

[](#yourcontroller)

```
public function payView()
    {
        return view('payment-page');
    }

    public function payment(Request $request)
    {
        return LaravelRazorpayFacade::payment($request)
                        ->capture()
                        ->redirectToRouteName('payment');
    }

    # also can do like this
    public function payment(Request $request)
    {
        $razorpay = LaravelRazorpayFacade::payment($request)->capture();

        return $razorpay->redirectIf($razorpay->payment->error_code === null, function () {
            return redirect()->back();
        });
    }
```

### Changelog

[](#changelog)

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

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

[](#contributing)

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

### Security

[](#security)

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

Credits
-------

[](#credits)

- [The Test Coder](https://github.com/thetestcoder)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Every ~0 days

Total

2

Last Release

1906d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/45e905b567fc12b29a159939bae8c391864ba2f1493676c720b4a3e987726ae5?d=identicon)[thetestcoder](/maintainers/thetestcoder)

---

Top Contributors

[![thetestcoder](https://avatars.githubusercontent.com/u/67789776?v=4)](https://github.com/thetestcoder "thetestcoder (19 commits)")

---

Tags

razorpaythetestcoderlaravel-razorpayRazorpay payment gateway

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/thetestcoder-laravel-razorpay/health.svg)

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

###  Alternatives

[razorpay/magento

Razorpay Magento 2.0 plugin for accepting payments.

3076.5k1](/packages/razorpay-magento)[msonowal/laravel-razor-pay-cashier

Laravel Cashier provides an expressive, fluent interface to Razorpay's subscription billing services.

2625.3k](/packages/msonowal-laravel-razor-pay-cashier)

PHPackages © 2026

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