PHP Classes

Laravel Instapago: process payments with the Instapago and Laravel

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 63 All time: 10,443 This week: 455Up
Version License PHP version Categories
laravel-instapago 2.0.1MIT/X Consortium ...5.6PHP 5, E-Commerce, Libraries, Web ser...
Description 

Authors

José Martorano
Angel Cruz


Contributor
This package is specific mainly for applications used in Venezuela Venezuela .

This class can process payments with the Instapago and Laravel.

It can send HTTP requests to the Instapago API Web server to process several types of payment operations.

Currently it can submit a payment request, process pre-authorized payments, cancel a payment, and get information about a payment.

The code comments are in Spanish.

Picture of ángel cruz
  Performance   Level  

 

Documentation

Php Instapago

<p align="center">

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

</p>

<p align="center">

<sup style="color: #d0d0d0;"><b>Note</b> The logos are owned by Instapago and Banesco, respectively..</sup>

</p>

GitHub issues GitHub forks GitHub license

Installation

To install, run the following command in your project directory

$ composer require socialgest/laravel-instapago

Then in config/app.php add the following to the providers array:

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:

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

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

use Socialgest\Instapago\Instapago;

Configuration

Set in .env

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

Example Usage


use Socialgest\Instapago\Instapago;

...

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',
    ];

    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
    }     
}

Documentation

Documentation (EN)

Documentación (ES)

Key for test

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

License MIT :copyright: 2016


  Files folder image Files (20)  
File Role Description
Files folder imageasset (1 file)
Files folder imagehelp (1 file)
Files folder imagesrc (3 files, 3 directories)
Files folder imagetests (1 file)
Accessible without login Plain text file CHANGELOG.md Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file CONDUCT.md Data Auxiliary data
Accessible without login Plain text file CONTRIBUTING.md Data Auxiliary data
Accessible without login Plain text file ISSUE_TEMPLATE.md Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file LICENSE.md Lic. License text
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file PULL_REQUEST_TEMPLATE.md Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:63
This week:0
All time:10,443
This week:455Up