PHP code example of ailos / sdk

1. Go to this page and download the library: Download ailos/sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ailos / sdk example snippets


$config = new CobrancaConfig(
    consumerKey: '...',
    consumerSecret: '...',
    urlCallback: 'https://meusite.com/callback',
    developerKey: '...',
    codigoCooperativa: '0101',
    codigoConta: '12345',
    senha: '...',
    ambiente: Ambiente::Producao,
);

$ailos = new Ailos()->cobranca($config);

$config = new CobrancaConfig(
    storage: new RedisStorage(...),
    http: new GuzzleHttp(...),
);