2017 © Pedro Peláez
 

library khipu-laravel

A Laravel Package to use Khipu (http://khipu.com) modified from freshworkstudio/khipu-laravel all base rights for freshworkstudio

image

blenderdeluxe/khipu-laravel

A Laravel Package to use Khipu (http://khipu.com) modified from freshworkstudio/khipu-laravel all base rights for freshworkstudio

  • Saturday, August 6, 2016
  • by blenderdeluxe
  • Repository
  • 1 Watchers
  • 0 Stars
  • 63 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 2 % Grown

The README.md

Laravel Khipu Package

Package modified from Freshwork Studio for personal use all rights for them., (*1)

Khipu It's a chilean payment gateway to automate wire transfers. You can checkout the Khipu API documentation here., (*2)

This project is based on the amazing guys of Tifón and Freshwork Studio. https://github.com/khipu/lib-php, (*3)

Installation

Step 1: Install Through Composer

composer require blenderdeluxe/khipu-laravel

Step 2: Add the Service Provider

In the app/config/app.php file, add the following to the providers array:, (*4)

'providers' => array(
    …
    BlenderDeluxe\LaravelKhipu\KhipuServiceProvider::class,
    …
),

Step 3: Add the alias

In the app/config/app.php file, add the following to the aliases array:, (*5)

'aliases' => array(
    …
    'Khipu' => BlenderDeluxe\LaravelKhipu\Facades\Khipu::class,
    …
),

Step 3: Publish the configuration

$ php artisan vendor:publish --provider="BlenderDeluxe\LaravelKhipu\KhipuServiceProvider"

Step 4: Configure your .env or edit you brand new config/khipu.php

...
KHIPU_ID=99999
KHIPU_KEY=ec19c08f3bdb2162e99144b1f6b9c0e2fe1856e0

Step 5: Enjoy!

Usage

Option A: use the Facade

//routes.php

Route::get('/', function () {
    $banks =  Khipu::loadService('ReceiverBanks')->consult();

    echo $banks;
});

Option B: Typehint the class

TypeHint the BlenderDeluxe\Khipu\Khipu class. It'll be automatically authenticated using your configuration credentials (KHIPU_ID and KHIPU_KEY), (*6)

//routes.php

Route::get('/', function (BlenderDeluxe\Khipu\Khipu $khipu) {
    $banks =  $khipu->loadService('ReceiverBanks')->consult();

    //You can also can call the service as a properties of the class..
    $khipu->ReceiverBanks->consult();

    echo $banks;
});

The Versions

06/08 2016

dev-master

9999999-dev

A Laravel Package to use Khipu (http://khipu.com) modified from freshworkstudio/khipu-laravel all base rights for freshworkstudio

  Sources   Download

MIT

The Requires

 

The Development Requires

by Diego Cortes

06/08 2016

1.0.1

1.0.1.0

A Laravel Package to use Khipu (http://khipu.com) modified from freshworkstudio/khipu-laravel all base rights for freshworkstudio

  Sources   Download

MIT

The Requires

 

The Development Requires

by Diego Cortes

06/08 2016

1.0.0

1.0.0.0

A Laravel Package to use Khipu (http://khipu.com) modified from freshworkstudio/khipu-laravel all base rights for freshworkstudio

  Sources   Download

MIT

The Requires

 

The Development Requires

by Diego Cortes