EBANX is the market leader in e-commerce payment solutions for International Merchants selling online to Brazil. This library enables you to integrate EBANX with any PHP application.
The EBANX library is available on Packagist (https://packagist.org/packages/ebanx/ebanx), therefore you can install it by simply updating your composer.json file:
{
"require" : {
"ebanx/ebanx": "dev-master"
}
}
After that run composer install and wait for it to finish. Include the Composer generated autoloader from 'vendor/autoload.php' and you're ready to use the library.
Clone the git repository anywhere you want and include the EBANX library autoloader from 'src/autoload.php'.
To use the EBANX PHP library you need to setup your integration key.
\Ebanx\Config::setIntegrationKey('your-integration-key');
If you need to change other settings, you can use the following function call:
\Ebanx\Config::set([
'integrationKey' => 'your-integration-key'
, 'testMode' => true
]);
You can change the following settings:
To create a new API request, just call one of the following methods on the \Ebanx\Ebanx class and supply it with the request parameters:
doRequest command example:
require_once __DIR__ . 'vendor/autoload.php';
\Ebanx\Config::setIntegrationKey('6e556ff76e55...56ff7');
$request = \Ebanx\Ebanx::doRequest([
'currency_code' => 'USD'
, 'amount' => 119.90
, 'name' => 'Jose da Silva'
, 'email' => 'jose@example.org'
, 'payment_type_code' => 'boleto'
, 'merchant_payment_code' => '10101101'
]);