ortigan/cashfree

Cashfree Library for Laravel

v1.0.3 2023-09-01 05:34 UTC

This package is auto-updated.

Last update: 2025-04-29 01:12:48 UTC


README

 cashfree library

Cashfree package for laravel

Total Downloads License

Simplified laravel package for cashfree integration. The package provides easy to use functions that will enable you to integrate cashfree API's seamlessly.

Installation

You can install the package via composer:

composer require ortigan/cashfree

You can optionally publish the config file with:

 php artisan vendor:publish --provider="Ortigan\Cashfree\CashfreeServiceProvider" --tag="cashfree-config"

Configuration

Modify your .env

Required

// required if you use "Auto Collect" 
CASHFREE_AUTO_COLLECT_CLIENT_ID=
CASHFREE_AUTO_COLLECT_SECRET_KEY=

// required if you use "Payout"
CASHFREE_PAYOUT_CLIENT_ID=
CASHFREE_PAYOUT_CLIENT_KEY=

Optional

CASHFREE_SANDBOX=true|false
CASHFREE_AUTO_COLLECT_TEST_URL=
CASHFREE_AUTO_COLLECT_PROD_URL=
CASHFREE_AUTO_COLLECT_AUTH_ROUTE=
CASHFREE_PAYOUT_TEST_URL=
CASHFREE_PAYOUT_PROD_URL=
CASHFREE_PAYOUT_AUTH_ROUTE=

Basic Usage

use Ortigan/Cashfree/Cashfree;

$virtualAccount = Cashfree::auto_collect()->createVirtualAccount([
     'vAccountId' => 'johndoe_1324',
     'name' => John Doe,
     'phone' => "9999999999",
     'email' => 'johndoe@gmail.com',
     'min_amount' => 50000,
     'max_amount' => 500000
 ]);

Response

{
    "status": "SUCCESS",
    "subCode": "200",
    "message": "Virtual account added successfully",
    "data": [
        "accountNumber": "CASHFREE1234VATEST",
        "ifsc": "YESB0CMSNOC"
    ]
}

Services incuded

  • Payout
  • Auto Collect
  • Verification Suite

License

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