New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

dbhosale/indipay

The Laravel 5 Package for Indian Payment Gateways. Currently supported gateways: CCAvenue, PayUMoney, EBS, CitrusPay, InstaMojo
129 1
Install
composer require dbhosale/indipay
Latest Version:v1.1.2
PHP:>=5.4.0
Laravel:5 · 6
Older releases:4
License:MIT
Last Updated:Sep 6, 2017
Links: GitHub  ·  Packagist
Maintainer: dbhosale

IndiPay

The Laravel 5 Package for Indian Payment Gateways. Currently supported gateway: CCAvenue, PayUMoney, EBS, CitrusPay

For Laravel 4.2 Package Click Here

Installation

Step 1: Install package using composer

    composer require dbhosale/indipay

Step 2: Add the service provider to the config/app.php file in Laravel


    Softon\Indipay\IndipayServiceProvider::class,

Step 3: Add an alias for the Facade to the config/app.php file in Laravel


    'Indipay' => Softon\Indipay\Facades\Indipay::class,

Step 4: Publish the config & Middleware by running in your terminal


    php artisan vendor:publish

Step 5: Modify the app\Http\Kernel.php to use the new Middleware. This is required so as to avoid CSRF verification on the Response Url from the payment gateways. You may adjust the routes in the config file config/indipay.php to disable CSRF on your gateways response routes.


    'App\Http\Middleware\VerifyCsrfToken',

to


    'App\Http\Middleware\VerifyCsrfMiddleware',

Usage

Edit the config/indipay.php. Set the appropriate Gateway and its parameters. Then in your code...

 use Softon\Indipay\Facades\Indipay;  

Initiate Purchase Request and Redirect using the default gateway:-

      /* All Required Parameters by your Gateway */
      
      $parameters = [
      
        'tid' => '1233221223322',
        
        'order_id' => '1232212',
        
        'amount' => '1200.00',
        
      ];
      
      $order = Indipay::prepare($parameters);
      return Indipay::process($order);

Initiate Purchase Request and Redirect using any of the configured gateway:-

      /* All Required Parameters by your Gateway */
      
      $parameters = [
      
        'tid' => '1233221223322',
        
        'order_id' => '1232212',
        
        'amount' => '1200.00',
        
      ];
      
      // gateway = CCAvenue / PayUMoney / EBS / Citrus / InstaMojo
      
      $order = Indipay::gateway('NameOfGateway')->prepare($parameters);
      return Indipay::process($order);

Get the Response from the Gateway (Add the Code to the Redirect Url Set in the config file. Also add the response route to the remove_csrf_check config item to remove CSRF check on these routes.):-

 
    public function response(Request $request)
    
    {
        // For default Gateway
        $response = Indipay::response($request);
        
        // For Otherthan Default Gateway
        $response = Indipay::gateway('NameOfGatewayUsedDuringRequest')->response($request);

        dd($response);
    
    }  

Related Packages

softon/indipay

The Laravel 5 Package for Indian Payment Gateways. Currently supported gateways:...

97,741 64
leelam/cash

The Laravel 5 Package for Indian Payment Gateways. Currently supported gateways:...

43 3
fivesqrd/fluent-laravel

A Laravel 5 service provider for including the Fluent PHP library.

3,198 0

Version History

Version Released PHP Laravel License
v1.1.2 >=5.4.0 ~5.0|~6.0 MIT
v1.1.1 >=5.4.0 ~5.0|~6.0 MIT
v1.1.0 >=5.4.0 ~5.0|~6.0 MIT
v1.0.11 >=5.4.0 ~5.0|~6.0 MIT
v1.0.10 >=5.4.0 ~5.0|~6.0 MIT
Pre-releases (1)
Version Released PHP Laravel License
v1.1.0-beta >=5.4.0 ~5.0|~6.0 MIT