PHP Classes
elePHPant
Icontem

PHP Instapago: Process payments with the Instapago API

Recommend this page to a friend!
  Info   View files Documentation   View files View files (19)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2017-03-17 (3 months ago) RSS 2.0 feedNot enough user ratingsTotal: 103 All time: 8,672 This week: 706Up
Version License PHP version Categories
php-instapago 3.0.0MIT/X Consortium ...5.6PHP 5, E-Commerce, Web services
Description Author

This class can process payments with the Instapago API.

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: 2 packages by
Country: Venezuela Venezuela
Age: 29
All time rank: 400418 in Venezuela Venezuela
Week rank: 1056 Up9 in Venezuela Venezuela Up

Details

Php Instapago <p align="center">

Librería Instapago para PHP

</p> <p align="center">

<sup style="color: #d0d0d0;"><b>NOTA</b> Los logos son propiedad de Instapago y Banesco, respectivamente.</sup>

</p>

GitHub issues GitHub forks GitHub license Scrutinizer Code Quality Codacy Badge Join the chat at https://gitter.im/abr4xas/php-instapago Build Status

instalación

Primero, composer

Luego:

$ composer require instapago/instapago
$ composer dumpautoload -o // opcional

como usar

creamos un archivo index.php

composer

<?php

require 'vendor/autoload.php';

use \Instapago\Api;


$paymentData = [
  'amount' => '200',
  'description' => 'test',
  'card_holder' => 'jon doe',
  'card_holder_id' => '11111111',
  'card_number' => '4111111111111111',
  'cvc' => '123',
  'expiration' => '12/2020',
  'ip' => '127.0.0.1',
];

try{

  $api = new Api('<keyId>','<publicKeyId>');

  $respuesta = $api->directPayment($paymentData);
  // hacer algo con $respuesta
}catch(\Instapago\Exceptions\InstapagoException $e){

  echo $e->getMessage(); // manejar el error

}

Podemos revisar rápidamente si todo funciona correctamente escribiendo:

$ php -S localhost:8000

llaves de pruebas

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

phpunit

$ phpunit --configuration="phpunit.xml.dist"

enlaces

licencia

Licencia MIT :copyright: 2016

  Files folder image Files  
File Role Description
Files folder imagehelp (4 files)
Files folder imageInstapago (2 files, 1 directory)
Files folder imagetests (1 file)
Accessible without login Plain text file .travis.yml Data Auxiliary data
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 contributors.txt Doc. Documentation
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Example script

  Files folder image Files  /  help  
File Role Description
  Accessible without login Plain text file AUTORES.md Data Auxiliary data
  Accessible without login Plain text file CONTRIBUCION.md Data Auxiliary data
  Accessible without login Plain text file DOCUMENTACION.md Doc. Documentation
  Accessible without login Image file hYNsH6B.png Icon Icon image

  Files folder image Files  /  Instapago  
File Role Description
Files folder imageExceptions (6 files)
  Plain text file Api.php Class Class source
  Plain text file Validator.php Class Class source

  Files folder image Files  /  Instapago  /  Exceptions  
File Role Description
  Plain text file AuthException.php Class Class source
  Plain text file BankRejectException.php Class Class source
  Plain text file InstapagoException.php Class Class source
  Plain text file InvalidInputException.php Class Class source
  Plain text file TimeoutException.php Class Class source
  Plain text file ValidationException.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:103
This week:0
All time:8,672
This week:706Up