Download the PHP package cobrefacil/sdk-php without Composer

On this page you can find all versions of the php package cobrefacil/sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sdk-php

Cobre Fácil - PHP SDK

SDK oficial de integração à API da Cobre Fácil.
Para ler a documentação da API acesse: https://developers.cobrefacil.com.br

Pré requisitos

  1. PHP >= 7.1
  2. cURL
  3. Composer

Instalação

A instalação é realizada via Composer através do comando:

Autenticação

Para realizar a autenticação é necessário informar no construtor da classe CobreFacil o app_id e secret disponíveis no painel de sua conta.

Essa classe é a responsável por gerar o token que será utilizado nas requisições e facilitar o acesso aos recursos disponíveis.

Por padrão a classe utiliza o ambiente de produção, caso deseje utilizar o ambiente de sandbox basta chamar o método setProduction e passar o valor false.

Recursos Disponíveis

Atualmente nosso SDK disponibiliza métodos para facilitar a manipulação de Clientes, Cartões de Crédito e Cobranças. Para saber quais dados devem ser enviados e recebidos consulte a documentação da API.

Os dados devem ser enviados em forma de array associativo:

E as respostas também são no formato de array associativo, exemplo usando a variável $response do exemplo anterior:

Clientes

https://developers.cobrefacil.com.br/#clientes

Cartões de Crédito

https://developers.cobrefacil.com.br/#cartao-de-credito

Cobranças

https://developers.cobrefacil.com.br/#cobrancas

Tratamento de erros

https://developers.cobrefacil.com.br/#erros

Caso aconteça algum erro durante uma requisição, será retornada uma exception.

E para facilitar o tratamento dos erros disponibilizamos 3 exceptions que facilitam identificar qual foi o tipo de erro.

Erro na autenticação:

Erro na requisição:

Webhooks

https://developers.cobrefacil.com.br/#webhooks

Para facilitar o tratamento dos eventos de webhook recebidos, disponibilizamos a classe WebhookEvent.

Com ela é possível utilizar métodos para auxiliar na leitura dos dados:

E também métodos para fazer algumas verificações:


All versions of sdk-php with dependencies

PHP Build Version
Package Version
Requires ext-curl Version *
ext-json Version *
ext-mbstring Version *
guzzlehttp/guzzle Version ^6.5
php Version >=7.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cobrefacil/sdk-php contains the following files

Loading the files please wait ....