freshworkstudio/khipu-laravel
A Laravel Package to use Khipu (http://khipu.com)
5,412
5
| Install | |
|---|---|
composer require freshworkstudio/khipu-laravel |
|
| Latest Version: | 1.0.3 |
| PHP: | >=5.3.0 |
| Laravel: | 5 |
| License: | MIT |
| Last Updated: | Sep 3, 2015 |
| Links: | GitHub · Packagist |
Maintainer: gonzunigad
Laravel Khipu Package
Khipu It's a chilean payment gateway to automate wire transfers. You can checkout the Khipu API documentation here.
This project is based on the amazing guys of Tifón and Freshwork Studio. https://github.com/khipu/lib-php
Installation
Step 1: Install Through Composer
composer require freshworkstudio/khipu-laravel
Step 2: Add the Service Provider
In the app/config/app.php file, add the following to the providers array:
'providers' => array(
…
'FreshworkStudio\LaravelKhipu\KhipuServiceProvider',
…
),
Step 3: Add the alias
In the app/config/app.php file, add the following to the aliases array:
'aliases' => array(
…
'Khipu' => 'FreshworkStudio\LaravelKhipu\Facades\Khipu',
…
),
Step 3: Publish the configuration
$ pa vendor:publish --provider="FreshworkStudio\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 FreshworkStudio\Khipu\Khipu class.
It'll be automatically authenticated using your configuration credentials (KHIPU_ID and KHIPU_KEY)
//routes.php
Route::get('/', function (FreshworkStudio\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;
});
Related Packages
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
644,549,754
9,698
laravel/serializable-closure
Laravel Serializable Closure provides an easy and secure way to serialize closur...
423,477,751
607
nunomaduro/collision
Cli error handling for console/command-line PHP applications.
403,217,078
4,664
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 1.0.3 | >=5.3.0 | ~5.0 | MIT | |
| 1.0.2 | >=5.3.0 | ~5.0 | MIT | |
| 1.0.1 | >=5.3.0 | ~5.0 | MIT | |
| 1.0 | >=5.3.0 | ~5.0 | MIT | |
| 0.1.8 | >=5.3.0 | ~5.0 | MIT | |
| 0.1.7 | >=5.3.0 | ~5.0 | MIT | |
| 0.1.6 | >=5.3.0 | ~5.0 | MIT | |
| 0.1.5 | >=5.3.0 | ~5.0 | MIT | |
| 0.1.3 | >=5.3.0 | ~5.0 | MIT | |
| 0.1.2 | >=5.3.0 | ~5.0 | MIT | |
| 0.1.1 | >=5.3.0 | 5.0.* | MIT | |
| 0.1 | >=5.3.0 | 5.0.* | MIT |