PHPackages                             cashfree/omnipay-cashfree - 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. cashfree/omnipay-cashfree

ActiveLibrary[Payment Processing](/categories/payments)

cashfree/omnipay-cashfree
=========================

Cashfree driver for the Omnipay payment processing library

1.0.0(4y ago)1403MITPHP

Since Jul 7Pushed 4y ago2 watchersCompare

[ Source](https://github.com/cashfree/omnipay-cashfree)[ Packagist](https://packagist.org/packages/cashfree/omnipay-cashfree)[ Docs](https://github.com/cashfree/omnipay-cashfree)[ RSS](/packages/cashfree-omnipay-cashfree/feed)WikiDiscussions master Synced 3d ago

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

Omnipay: Cashfree
=================

[](#omnipay-cashfree)

**Cashfree driver for the Omnipay PHP payment processing library**

[Omnipay](https://github.com/thephpleague/omnipay) is a framework agnostic, multi-gateway payment processing library for PHP. This package implements Cashfree support for Omnipay. This version supports PHP ^5.6 and PHP ^7.

This is the `master` branch of Omnipay, handling Omnipay version `3.x`.

Installation
============

[](#installation)

Omnipay is installed via [Composer](http://getcomposer.org/). To install, simply add it to your `composer.json` file:

```
{
    "require": {
        "omnipay/cashfree": "~3.0"
    }
}
```

And run composer to update your dependencies:

```
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update

```

Basic Usage
===========

[](#basic-usage)

The following gateways are provided by this package:

- Cashfree\_Checkout

For general Omnipay usage instructions, please see the main [Omnipay](https://github.com/thephpleague/omnipay) repository.

Supported Methods
=================

[](#supported-methods)

\* Cashfree Checkout Method
---------------------------

[](#-cashfree-checkout-method)

Checkout Form is the simplest way to integrate Cashfree Payment Gateway in your website to accept payments quickly. In this integration method, you prepare the checkout form with the correct order and customer details and redirect users from your checkout page to Cashfree’s payment screen. Cashfree payment gateway supports all major payment methods such as credit and debit cards, wallets, UPI, and netbanking.

The Direct gateway methods for handling cards are:

- `purchase()` - with completePurchase for 3D Secure and cashfree redirect

### Direct Purchase

[](#direct-purchase)

```
use Omnipay\Omnipay;
use Omnipay\Common\CreditCard;

// Create the gateway object.

$gateway = GatewayFactory::create('Cashfree');

$response = $gateway->initialize($params);

// Create the credit card object from details entered by the user.

$card = new CreditCard([
    'firstName' => 'Card',
    'billingPhone' => '91********',

    // Billing address details are required.
    ...
]);

// Create the minimal request message.

$requestMessage = $gateway->purchase([
    'amount' => '99.99',
    'currency' => 'INR',
    'card' => $card,
    'transactionId' => $transactionId,
    'description' => 'Description here',
    'returnUrl' => 'https://example.co.uk/gateways/Cashfree/completePurchase',
    'returnUrl' => 'https://example.co.uk/gateways/Cashfree/acceptNotification',
]);

#### Redirect (3D Secure)

If the authorization result is a redirect, then a quick and dirty way to redirect is:

if ($response->isSuccessful()) {
    // The transaction is complete and successful and no further action is needed.
    // This may happen if a cardReference has been supplied, having captured
    // the card reference with a CVV and using it for the first time. The CVV will
    // only be kept by the gateway for this first authorization. This also assumes
    // 3D Secure is turned off.
} elseif ($response->isRedirect()) {
    // Redirect to offsite payment gateway to capture the users credit card
    // details.
    // If a cardReference was provided, then only the CVV will be asked for.
    // 3D Secure will be performed here too, if enabled.
    // Once the user is redirected to the gateway, the results will be POSTed
    // to the [notification handler](#sage-pay-server-notification-handler).
    // The handler will then inform the gateway where to finally return the user
    // to on the merchant site.

    $response->redirect();
} else {
    // Something went wrong; get the message.
    // The error may be a simple validation error on the address details.
    // Catch those and allow the user to correct the details and submit again.
    // This is a particular pain point of Sage Pay Server.
    $reason = $response->getMessage();
}
```

Support
=======

[](#support)

If you are having general issues with Omnipay, we suggest posting on [Stack Overflow](http://stackoverflow.com/). Be sure to add the [omnipay tag](http://stackoverflow.com/questions/tagged/omnipay) so it can be easily found.

If you want to keep up to date with release announcements, discuss ideas for the project, or ask more detailed questions, there is also a [mailing list](https://groups.google.com/forum/#!forum/omnipay) which you can subscribe to.

If you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/cashfree/omnipay-cashfree/issues), or better yet, fork the library and submit a pull request.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity51

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

Unknown

Total

1

Last Release

1771d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/40a59714693f29aa58788f28ece4732ff144ae31d182d14fb9a5dfced11862fc?d=identicon)[Cashfree developer](/maintainers/Cashfree%20developer)

---

Top Contributors

[![prem-cashfree](https://avatars.githubusercontent.com/u/71376913?v=4)](https://github.com/prem-cashfree "prem-cashfree (8 commits)")

---

Tags

paymentgatewaypaymerchantomnipaycashfree

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/cashfree-omnipay-cashfree/health.svg)

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

###  Alternatives

[lokielse/omnipay-alipay

Alipay gateway for Omnipay payment processing library

587421.0k11](/packages/lokielse-omnipay-alipay)[sudiptpa/omnipay-nabtransact

National Australia Bank (NAB) Transact driver for the Omnipay payment processing library.

1017.2k](/packages/sudiptpa-omnipay-nabtransact)[lucassmacedo/omnipay-mercadopago

MercadoPago gateway for OmniPay

154.6k](/packages/lucassmacedo-omnipay-mercadopago)

PHPackages © 2026

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