erick / erede-acquiring
E-Rede Acquiring PHP Library
Requires
- php: >=5.3.3
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- respect/validation: *
Requires (Dev)
- codeclimate/php-test-reporter: dev-master
- phpunit/phpunit: ~4.0
- satooshi/php-coveralls: ~0.6.1
- squizlabs/php_codesniffer: ~2.0
This package is not auto-updated.
Last update: 2025-04-26 23:42:03 UTC
README
A PHP client to use the E-Rede Acquiring Web Service.
Requirements
PHP 5.3.3 and later.
Composer
You can install the bindings via Composer. Add this to your composer.json
:
{ "require": { "rede/acquiring": "1.0.1" } }
Then install via:
composer.phar install
To use the bindings, use Composer's autoload:
require_once('vendor/autoload.php');
Manual Installation
If you do not wish to use Composer, you can download the latest release. Then, to use the bindings, include the init.php
file.
require_once('/path/to/erede-acquiring/init.php');
Getting Started
In order to increase the readability we suggest to declare the code below on the top of your file
use \ERede\Acquiring\Acquirer; use \ERede\Acquiring\TransactionType;
20 seconds tutorial
The simplest way to do a payment using the E-Rede Acquiring Web Service is using this code
$data = array('credit_card' => '4242424242424242', 'exp_month' => 5, 'exp_year' => 2015, 'amount' => '1050', 'reference' => '1234', 'capture' => true); $acquirer = new Acquirer("FILIATION", "PASSWORD"); $response = $acquirer->fetch(TransactionType::CREDIT)->authorize($data); print_r($response);
Next steps
Find more details about how to use this library
E-Rede Acquiring Web Service Documentation
Please see https://www.userede.com.br/desenvolvedores for up-to-date documentation
Tests
In order to run tests first install PHPUnit via Composer:
composer.phar update --dev
To run the test suite:
./vendor/bin/phpunit