2017 © Pedro Peláez
 

library laravel-esewa

A E-sewa payment gateway integration for laravel

image

act360/laravel-esewa

A E-sewa payment gateway integration for laravel

  • Friday, May 19, 2017
  • by act360
  • Repository
  • 1 Watchers
  • 2 Stars
  • 26 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Easy Esewa Payment Integration For Your Laravel App

This composer package offers a E-sewa payment gateway setup for your Laravel applications., (*1)

Installation

Begin by pulling in the package through Composer., (*2)

composer require act360/laravel-esewa

Next, if using Laravel 5, include the service provider within your config/app.php file., (*3)

'providers' => [
    Esewa\EsewaServiceProvider::class,
];

Finally, add these variable to .env., (*4)

ESEWA_MERCHANT_ID=YOUR_ESEWA_MERCHANT_ID
ESEWA_TRANSACTION_URL=ESEWA_PAYMENT_URL

Usage

Within your Model, make a call to the Billable trait., (*5)

namespace App;

use Esewa\Billable;

Class Store extends Model
{
    use Billable;
}

You can use this on controller as:, (*6)

Class StoreController extends Controller
{
    public function create(Request $request, Store $store)
    {
        $item = $store->create($request->all());
        $payment_details = [
            'tAmt' => 100,
            'amt' => 100,
            'pid' => "PR-01",
            'su' => "YOUR_SUCCESS_URL",
            'fu' => "YOUR_FAILURE_URL"
        ];
        $item->charge($payment_details);
    }

    public function success()
    {
        // Do something here when payment success.
    }

    public function failure()
    {
        // Do something here when payment failure.
    }
}

Done! You'll now be able to use esewa gateway., (*7)

The Versions

19/05 2017

dev-master

9999999-dev

A E-sewa payment gateway integration for laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Santosh Jung Shahi

19/05 2017

v0.1.2

0.1.2.0

A E-sewa payment gateway integration for laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Santosh Jung Shahi

19/05 2017

v0.1.1

0.1.1.0

A E-sewa payment gateway integration for laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Santosh Jung Shahi

17/05 2017

v0.1.0

0.1.0.0

A E-sewa payment gateway integration for laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Santosh Jung Shahi