2017 © Pedro Peláez
 

library laravel-instapago

Simple library for Instapago API in Laravel 5.*

image

socialgest/laravel-instapago

Simple library for Instapago API in Laravel 5.*

  • Saturday, September 9, 2017
  • by SocialGest
  • Repository
  • 2 Watchers
  • 7 Stars
  • 6,283 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 10 % Grown

The README.md

Php Instapago, (*1)

Library for Instapago in Laravel 5.* (Version 1.0.0) , (*2)

Note The logos are owned by Instapago and Banesco, respectively.. , (*3)

GitHub issues GitHub forks GitHub license, (*4)

Installation

To install, run the following command in your project directory, (*5)

$ composer require socialgest/laravel-instapago

Then in config/app.php add the following to the providers array:, (*6)

Socialgest\Instapago\InstapagoServiceProvider::class

Also, if you must (recommend you don't), add the Facade class to the aliases array in config/app.php as well:, (*7)

'Instapago'    => Socialgest\Instapago\Facades\Instapago::class

But it'd be best to just inject the class, like so (this should be familiar):, (*8)

use Socialgest\Instapago\Instapago;

Configuration

Set in .env

INSTAPAGO_KEY_ID = 74D4A278-C3F8-4D7A-9894-FA0571D7E023
INSTAPAGO_PUBLIC_KEY_ID = e9a5893e047b645fed12c82db877e05a

Example Usage

``` php, (*9)

use Socialgest\Instapago\Instapago;, (*10)

..., (*11)

public function pay() { $paymentData = [ 'amount' => '200', 'description' => 'test', 'cardHolder' => 'jon doe', 'cardHolderId' => '11111111', 'cardNumber' => '4111111111111111', 'cvc' => '123', 'expirationDate' => '12/2019', 'IP' => '127.0.0.1', ];, (*12)

try{
        $instapago = new Instapago();
        $respuesta = $instapago->directPayment($paymentData);
        // hacer algo con la respuesta
} catch(\Socialgest\Instapago\Instapago\Exceptions\InstapagoException $e){
    // manejar el error
} catch(\Socialgest\Instapago\Instapago\Exceptions\TimeoutException $e){
    // manejar el error
}     

}, (*13)

## Documentation

[Documentation (EN)](https://instapago.com/wp-content/uploads/Integration-Guide-Instapago-API-1.6.pdf)

[Documentación (ES)](https://instapago.com/wp-content/uploads/2016/02/Guia-Integracion-API-Instapago-1.6.pdf)

### Key for test

  • keyId = 74D4A278-C3F8-4D7A-9894-FA0571D7E023
  • publicKeyId = e9a5893e047b645fed12c82db877e05a ```

License MIT :copyright: 2016, (*14)

The Versions

09/09 2017

dev-master

9999999-dev https://github.com/socialgest/laravel-instapago

Simple library for Instapago API in Laravel 5.*

  Sources   Download

MIT

The Requires

 

The Development Requires

socialgest laravel-instapago

09/09 2017

2.1.0

2.1.0.0 https://github.com/socialgest/laravel-instapago

Simple library for Instapago API in Laravel 5.*

  Sources   Download

MIT

The Requires

 

The Development Requires

socialgest laravel-instapago

01/03 2017

2.0.0

2.0.0.0 https://github.com/socialgest/laravel-instapago

Simple library for Instapago API in Laravel 5.*

  Sources   Download

MIT

The Requires

 

The Development Requires

socialgest laravel-instapago