2017 © Pedro PelĆ”ez
 

project boleto-cloud

SDK de integraƧao com a API Boleto Cloud

image

millerp/boleto-cloud

SDK de integraƧao com a API Boleto Cloud

  • Tuesday, March 13, 2018
  • by millerp
  • Repository
  • 1 Watchers
  • 4 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 6 Versions
  • 11 % Grown

The README.md

Boleto Cloud PHP SDK - Code Climate StyleCI

SDK de integraƧao com a API Boleto Cloud, (*1)

  • Boleto Cloud - https://boletocloud.com/
  • DocumentaĆ§Ć£o da API - https://boletocloud.com/app/dev/api

InstalaĆ§Ć£o

composer require millerp/boleto-cloud, (*2)

Exemplo

<?php

use BoletoCloud\Api\Boleto;
use BoletoCloud\Api\Boleto\Beneficiario;
use BoletoCloud\Api\Boleto\Conta;
use BoletoCloud\Api\Boleto\Pagador;
use BoletoCloud\Api\Client;

require_once __DIR__."/vendor/autoload.php";

$client = new Client([
    'env'   => 'sandbox',
    'token' => 'api_key',
]);

$conta = new Conta();
$conta->setBanco("237")
    ->setAgencia("1234-5")
    ->setNumero("123456-0")
    ->setCarteira(12);

$beneficiarioEndereco = new Boleto\Endereco("beneficiario");
$beneficiarioEndereco->setCep("59020-000")
    ->setLogradouro("Avenida Hermes da Fonseca")
    ->setNumero("384")
    ->setBairro("PetrĆ³polis")
    ->setLocalidade("Natal")
    ->setUf("RN")
    ->setComplemento("Sala 2A, segundo andar");

$beneficiario = new Beneficiario();
$beneficiario->setNome("DevAware Solutions")
    ->setCprf("15.719.277/0001-46")
    ->setEndereco($beneficiarioEndereco);

$pagadorEndereco = new Boleto\Endereco("pagador");
$pagadorEndereco->setCep("36240-000")
    ->setLogradouro("BR-499")
    ->setNumero("s/n")
    ->setBairro("Casa Natal")
    ->setLocalidade("Santos Dumont")
    ->setUf("MG")
    ->setComplemento("SĆ­tio - Subindo a serra da Mantiqueira");

$pagador = new Pagador();
$pagador->setNome("Alberto Santos Dumont")
    ->setCprf("111.111.111-11")
    ->setEndereco($pagadorEndereco);

$boleto = new Boleto();
$boleto->setConta($conta)
    ->setBeneficiario($beneficiario)
    ->setPagador($pagador)
    ->setEmissao(new \DateTime('2017-01-31'))
    ->setVencimento(new \DateTime('2017-02-05'))
    ->setDocumento('EX1')
    ->setNumero(rand(10000000000, 99999999999) . '-P')
    ->setTitulo('DM')
    ->setValor(121.53)
    ->setInstrucao([
        'AtenĆ§Ć£o! NƃO RECEBER ESTE BOLETO.' . date('d-m-y H:i:s'),
        'Este Ć© apenas um teste utilizando a API Boleto Cloud' . date('d-m-y H:i:s'),
        'Mais info em http://www.boletocloud.com/app/dev/api' . date('d-m-y H:i:s'),
    ]);

$retorno = $client->gerarBoleto($boleto);

The Versions

13/03 2018

dev-master

9999999-dev

SDK de integraƧao com a API Boleto Cloud

  Sources   Download

MIT

The Requires

 

The Development Requires

by Miller P. MagalhĆ£es

13/03 2018

v1.3.1

1.3.1.0

SDK de integraƧao com a API Boleto Cloud

  Sources   Download

MIT

The Requires

 

The Development Requires

by Miller P. MagalhĆ£es

02/03 2018

dev-analysis-Xljxbr

dev-analysis-Xljxbr

SDK de integraƧao com a API Boleto Cloud

  Sources   Download

MIT

The Requires

 

The Development Requires

by Miller P. MagalhĆ£es

26/01 2018

v1.3-beta

1.3.0.0-beta

SDK de integraƧao com a API Boleto Cloud

  Sources   Download

MIT

The Requires

 

The Development Requires

by Miller P. MagalhĆ£es

06/02 2017

dev-release/teste

dev-release/teste

SDK de integraƧao com a API Boleto Cloud

  Sources   Download

MIT

The Requires

 

The Development Requires

by Miller P. MagalhĆ£es

01/02 2017

v1.2-beta

1.2.0.0-beta

SDK de integraƧao com a API Boleto Cloud

  Sources   Download

MIT

The Requires

 

The Development Requires

by Miller P. MagalhĆ£es