PHPackages                             adicode-technologies/laravel-razorpay-easy - 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. adicode-technologies/laravel-razorpay-easy

ActiveLibrary[Payment Processing](/categories/payments)

adicode-technologies/laravel-razorpay-easy
==========================================

A simple and customizable Razorpay integration for Laravel applications

v1.0.1(10mo ago)1833MITPHPPHP ^8.1

Since Mar 6Pushed 10mo agoCompare

[ Source](https://github.com/Adicode-Technologies/laravel-razorpay-easy)[ Packagist](https://packagist.org/packages/adicode-technologies/laravel-razorpay-easy)[ RSS](/packages/adicode-technologies-laravel-razorpay-easy/feed)WikiDiscussions main Synced today

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

Laravel Razorpay Easy
=====================

[](#laravel-razorpay-easy)

A simple and highly customizable Razorpay integration package for Laravel applications.

Features
--------

[](#features)

- 🚀 Quick and easy setup
- 🛠️ Pre-built checkout page
- 🎨 Highly customizable
- 📊 Database integration for payment tracking
- 🔄 Event-driven architecture
- 🔗 Model relationships with payments
- 🔒 Secure payment processing
- 🪝 Webhook handling

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

[](#installation)

You can install the package via composer:

```
composer require adicode-technologies/laravel-razorpay-easy
```

After installing the package, publish the assets:

```
php artisan vendor:publish --provider="AdicodeTechnologies\LaravelRazorpayEasy\RazorpayServiceProvider"
```

Run the migrations:

```
php artisan migrate
```

Configuration
-------------

[](#configuration)

Add your Razorpay credentials to your `.env` file:

```
RAZORPAY_KEY_ID=your_key_id
RAZORPAY_KEY_SECRET=your_key_secret
RAZORPAY_WEBHOOK_SECRET=your_webhook_secret

```

You can customize the package behavior by modifying the `config/razorpay.php` file.

Basic Usage
-----------

[](#basic-usage)

\# Quick Checkout
-----------------

[](#-quick-checkout)

Redirect to the pre-built checkout page:

```
return redirect()->route('razorpay.checkout', [
    'amount' => 100, // Amount in your currency (e.g., 100 = ₹100)
    'description' => 'Payment for Order #123',
    'customer_name' => 'John Doe',
    'customer_email' => 'john@example.com',
    'callback_url' => route('orders.payment.callback', $orderId),
]);
```

\# Custom Callback Handler
--------------------------

[](#-custom-callback-handler)

Create a callback handler to process payments:

```
// routes/web.php
Route::post('orders/{order}/payment/callback', [OrderController::class, 'handlePaymentCallback'])
    ->name('orders.payment.callback');

// OrderController.php
public function handlePaymentCallback(Request $request, Order $order)
{
    try {
        // Process the payment
        $payment = app('razorpay')->processPayment($request->all());

        // Associate with order
        $payment->payable_id = $order->id;
        $payment->payable_type = get_class($order);
        $payment->save();

        // Update order status
        $order->update(['status' => 'paid']);

        return redirect()->route('orders.show', $order)
            ->with('success', 'Payment completed successfully!');
    } catch (\Exception $e) {
        return redirect()->route('orders.show', $order)
            ->with('error', 'Payment failed: ' . $e->getMessage());
    }
}
```

\# Using the Trait
------------------

[](#-using-the-trait)

Add payment functionality to your models:

```
// app/Models/Order.php
use AdicodeTechnologies\LaravelRazorpayEasy\Traits\HasRazorpayPayments;

class Order extends Model
{
    use HasRazorpayPayments;

    // ...
}
```

Then you can use:

```
$order = Order::find(1);

// Get all payments
$payments = $order->payments;

// Get successful payments
$successfulPayments = $order->successfulPayments;

// Get total paid
$totalPaid = $order->totalPaid();
```

\# Direct API Access
--------------------

[](#-direct-api-access)

Use the facade for direct API access:

```
use AdicodeTechnologies\LaravelRazorpayEasy\Facades\Razorpay;

// Create an order
$order = Razorpay::createOrder(100, 'INR');

// Fetch payment
$payment = Razorpay::fetchPayment($paymentId);

// Create refund
$refund = Razorpay::createRefund($paymentId, 100);
```

Browser Compatibility
---------------------

[](#browser-compatibility)

This package works with all major browsers. However, Brave Browser users may experience issues due to its privacy features. If you encounter problems:

- Try using incognito mode
- Temporarily disable Brave Shields
- Use an alternative browser like Chrome or Firefox

Events
------

[](#events)

The package dispatches the following events:

- `PaymentSucceeded`: When a payment is successfully processed
- `PaymentFailed`: When a payment fails
- `WebhookReceived`: When a webhook is received

License
-------

[](#license)

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

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance54

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.7% 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 ~164 days

Total

2

Last Release

320d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3438ae8c4fd46fe811d513753cc08add2b644e75add6410bc59a6d599974217a?d=identicon)[adisonmasih](/maintainers/adisonmasih)

---

Top Contributors

[![adisonmasih](https://avatars.githubusercontent.com/u/68416649?v=4)](https://github.com/adisonmasih "adisonmasih (6 commits)")[![johndoefromuk](https://avatars.githubusercontent.com/u/204454809?v=4)](https://github.com/johndoefromuk "johndoefromuk (1 commits)")

---

Tags

laravelpaymentgatewayrazorpay

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/adicode-technologies-laravel-razorpay-easy/health.svg)

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

###  Alternatives

[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4851.0k](/packages/sebdesign-laravel-viva-payments)[linkxtr/laravel-qrcode

A clean, modern, and easy-to-use QR code generator for Laravel

3720.4k](/packages/linkxtr-laravel-qrcode)

PHPackages © 2026

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