PHP Classes
elePHPant
Icontem

Laravel Instapago: process payments with the Instapago and Laravel

Recommend this page to a friend!
  Info   View files Documentation   View files View files (20)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2017-09-10 (1 year ago) RSS 2.0 feedNot enough user ratingsTotal: 58 All time: 9,383 This week: 831Up
Version License PHP version Categories
laravel-instapago 2.0.1MIT/X Consortium ...5.6PHP 5, E-Commerce, Libraries, Web ser...
Description Author
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.

  Performance   Level  
Name: ángel cruz <contact>
Classes: 3 packages by
Country: Uruguay Uruguay

Details

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

  Files folder image Files  /  asset  
File Role Description
  Accessible without login Image file logo.png Icon Icon image

  Files folder image Files  /  help  
File Role Description
  Accessible without login Plain text file DOCUMENTACION.md Data Auxiliary data

  Files folder image Files  /  src  
File Role Description
Files folder imageconfig (1 file)
Files folder imageExceptions (2 files)
Files folder imagefacades (1 file)
  Plain text file Instapago.php Class Class source
  Plain text file InstapagoServiceProvider.php Class Class source
  Plain text file MyValidator.php Class Class source

  Files folder image Files  /  src  /  config  
File Role Description
  Accessible without login Plain text file instapago.php Aux. Auxiliary script

  Files folder image Files  /  src  /  Exceptions  
File Role Description
  Plain text file InstapagoException.php Class Class source
  Plain text file TimeoutException.php Class Class source

  Files folder image Files  /  src  /  facades  
File Role Description
  Plain text file Instapago.php Class Class source

  Files folder image Files  /  tests  
File Role Description
  Plain text file ApiTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:58
This week:0
All time:9,383
This week:831Up