1. Go to this page and download the library: Download michaeld555/sicoob-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/ */
michaeld555 / sicoob-sdk example snippets
use Michaeld555\SicoobBoleto;
$sicoob = new SicoobBoleto();
$sicoob->setClientId('seu-client-id')
->setClientSecret('seu-client-secret') // apenas sandbox
->setCertificateCrt('/caminho/certificado.crt') // apenas produção
->setCertificateKey('/caminho/chave.key') // apenas produção
->setSandbox(true); // true para sandbox
$boleto = $sicoob->boleto();
// Incluir boleto
$boleto->incluir([
'numeroBoleto' => '123456',
'valor' => 150.00,
// ... demais campos conforme documentação Sicoob
]);
// Consultar
$boleto->consultar('123456');
// Segunda via
$boleto->segundaVia('123456');
// Atualizar
$boleto->atualizar('123456', ['valor' => 200.00]);
// Baixar (cancelar)
$boleto->baixar('123456', [
'motivoCancelamento' => 'ACERTOS'
]);