Download the PHP package egcservices/iugu-extension without Composer

On this page you can find all versions of the php package egcservices/iugu-extension. 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 iugu-extension

��# Iugu-extension

Biblioteca base utilizada [egcservices/iugu-php-sdk](https://github.com/elsongabriel/iugu-php-sdk)

Biblioteca que realiza integra��o com a API da [Iugu](http://www.iugu.com)

[![StyleCI](https://styleci.io/repos/140902040/shield?branch=master)](https://styleci.io/repos/140902040)

## Instala��o via composer

`bash

$ composer require egcservices/iugu-extension

`

## Servi�os

Este SDK extende os seguintes servi�os:

- [Marketplace/A��es da Conta Mestre](https://dev.iugu.com/reference#criar-subconta)

- [Split](https://dev.iugu.com/reference#criar-split-1)

- [Relat�rios](https://dev.iugu.com/reference#extrato-financeiro)

- [Planos](https://dev.iugu.com/reference#criar-plano)

[Refer�ncia da API](https://dev.iugu.com/reference)

[Documenta��o iugu-php-sdk](https://github.com/elsongabriel/iugu-php-sdk)

### Configura��o

Para utilizar este SDK, ser� necess�rio inserir em seu .env

`php

IUGUAPIKEY=CHAVEAPIIUGU

IUGUAPITESTKEY=CHAVEDETESTAPI_IUGU

IUGUACCOUNTID=IDDACONTA_MASTER

`

E em config/services.php

`php

'iugu' => [

'accountid' => env('IUGUACCOUNT_ID', ''),

'apitestkey' => env('IUGUAPITEST_KEY', ''),

'apikey' => env('IUGUAPI_KEY', ''),

]

`

Ao realizar use das classes, ser� necessario fazer o seguinte e instaciar a classe iugu

`php

use services\Iugu\Iugu;

use egcservices\Iugu\Exceptions\IuguException;

use egcservices\Iugu\Exceptions\IuguValidationException;

$iugu = new Iugu;

// Tamb�m possivel setar apitoken na chamada da classe

$iugu = new Iugu('apiKey');

`

### MarketPlace

#### Listar subcontas

`php

$response = $iugu->marketplace()->list();

// Imprime uma lista de subcontas

echo $response;

`

#### Criar MarketPlace

- [Refer�ncia](https://dev.iugu.com/reference#criar-subconta)

`php

$response = $iugu->marketplace()->create([

'parametros'

]);

// Imprime o ID da subconta

dd($response);

`

#### Editar MarketPlace

- [Refer�ncia](https://dev.iugu.com/reference#atualizar-subconta)

`php

$response = $iugu->marketplace()->update('SUBCONTA_ID',[

'parametros'

]);

// Imprime a subconta atualizada

dd($response);

`

#### Enviar verifica��o de subconta

- [Refer�ncia](https://dev.iugu.com/reference#enviar-verificacao-de-conta)

`php

$response = $iugu->marketplace()->requestVerification('SUBCONTA_ID',[

'parametros'

]);

dd($response);

`

#### Ver subconta

- [Refer�ncia](https://dev.iugu.com/reference#atualizar-subconta)

`php

$response = $iugu->marketplace()->show('SUBCONTA_ID');

dd($response);

`

#### Pedido de saque

`php

$response = $iugu->marketplace()->requestWithdraw('SUBCONTA_ID');

dd($response);

`

### Master

#### Adicionar Domic�lio Banc�rio

- [Refer�ncia](https://dev.iugu.com/reference#adicionar-domicilio-bancario)

`php

$iugu->master()->createBankVerificantion(['parametros']);

`

#### Verificar Envio de Domicilio Bancario

- [Refer�ncia](https://dev.iugu.com/reference#verificar-envio-de-domicilio-bancario)

`php

$iugu->master()->showBankVerificantion();

`

#### Solicitar verifica��o para uso de Cart�o de Cr�dito

:warning: O documento de comprovante de Contrato Social ou documento de Atividade � obrigat�rio

Al�m deste documento � necess�rio enviar (CNH ou RG) ou CPF caso n�o possua CNH.

- [Refer�ncia](https://dev.iugu.com/reference#solicitar-verifica%C3%A7%C3%A3o-para-uso-de-cart%C3%A3o-de-cr%C3%A9dito)

`php

$iugu->master()->requestCreditCardVerification(['parametros']);

`

#### Verificar Solicita��o de cart�o de cr�dito

- [Refer�ncia](https://dev.iugu.com/reference#verificar-solicita%C3%A7%C3%A3o-de-cart%C3%A3o-de-cr%C3%A9dito)

`php

$iugu->master()->checkCreditCardVerification();

`

#### Configurar Pagamentos

Habilita ou Desabilita o Pix.

- [Refer�ncia](https://dev.iugu.com/reference#configurar-pagamentos)

`php

$iugu->master()->settingPix(TRUE or FALSE)

`

#### Consultar Gest�o de Cobran�as.

- [Refer�ncia](https://dev.iugu.com/reference#reenviar-gatilho-por-per%C3%ADodo)

`php

$iugu->master()->ConsultManagement()

`

### Alterar Gest�o de Cobran�as.

- [Refer�ncia](https://dev.iugu.com/reference#alterar-gest%C3%A3o-1)

`php

$iugu->master()->updateManagement()

`

### Multi Split

:warning: Criar um novo multi split sobrep�e o que j� est� configurado. Todas as faturas pagas em uma conta ir�o respeitar as regras de splits criadas.

#### Criar split

- [Referencia](https://dev.iugu.com/reference#criar-split-1)

`php

$response = $iugu->split()->create(['parametros']);

dd($response);

`

#### Listar splits

`php

$response = $iugu->split()->list();

dd($response);

`

#### Visualizar split

`php

$response = $iugu->split()->search('split_id');

dd($response);

`

#### Consultar splits

`php

$response = $iugu->split()->current('split_id');

dd($response);

`

#### Planos

### Listar um plano

- [Refer�ncia](https://dev.iugu.com/reference#listar-plano)

`php

$response = $iugu->plan->list();

dd($response);

`

### criar um plano

- [Paramentros](https://dev.iugu.com/reference#criar-plano)

`php

$response = $iugu->plan->create(['paramentros']);

dd($response);

`

### Alterar um Plano

- [Paramentros](https://dev.iugu.com/reference#alterar-plano)

`php

$response = $iugu->plan->update('id', ['paramentros']);

dd($response);

`

### Remover Plano

- [refer�ncia](https://dev.iugu.com/reference#remover-plano)

`php

$response = $iugu->plan->destroy('id');

dd($response);

`

### Buscar Plano

- [refer�ncia](https://dev.iugu.com/reference#buscar-plano)

`php

$response = $iugu->plan->get('id');

dd($response);

`

### Buscar Plano pelo Identificador

- [refer�ncia](https://dev.iugu.com/reference#buscar-plano-pelo-identificador)

`php

$response = $iugu->plan->getByIdentifier('identifier');

dd($response);

`

### alterar um plano

#### Helps

Consts

`php

// Obtenha um array com todos os bancos aceitos pela Iugu

const BANKS = [

'Ita�', 'Bradesco', 'Caixa Econ�mica', ...

]

const PERSON_TYPE = [

'Pessoa F�sica', 'Pessoa Jur�dica'

];

const PERSON_TYPE_PHYSICAL = 'Pessoa F�sica';

const PERSON_TYPE_LEGAL = 'Pessoa Jur�dica';

const INTERVAL_TYPES = [

'weeks', 'months'

];

const INTERVALTYPEWEEKS = 'weeks';

const INTERVALTYPEMONTHS = 'months';

const PAYABLE_WITHS = [

'all', 'creditcard', 'bankslip', 'pix'

];

const PAYABLEWITHALL = 'all';

const PAYABLEWITHCREDITCARD = 'creditcard';

const PAYABLEWITHBANKSLIP = 'bankslip';

const PAYABLEWITHPIX = 'pix';

`

# iugu-php-sdk

Biblioteca que realiza integra��o com a API da [Iugu](http://www.iugu.com)

[![StyleCI](https://styleci.io/repos/140902040/shield?branch=master)](https://styleci.io/repos/140902040)

[![Maintainability](https://api.codeclimate.com/v1/badges/d4e66f98ad0539e0b65d/maintainability)](https://codeclimate.com/github/egcservices/iugu-php-sdk/maintainability)

## Instala��o via composer

`bash

$ composer require egcservices/iugu-php-sdk

`

## Servi�os

Este SDK suporta os seguintes servi�os:

- [Clientes](https://dev.iugu.com/reference#testinput-2)

- [Cobran�a direta](https://dev.iugu.com/reference#cobranca-direta)

- [Faturas](https://dev.iugu.com/reference#criar-fatura)

- [M�todos de pagamento](https://dev.iugu.com/reference#testinput-3)

[Refer�ncia da API](https://dev.iugu.com/reference)

### Configura��o

Para utilizar este SDK, ser� necess�rio utilizar seu token de acesso de sua conta Iugu.

`php

use egcservices\Iugu;

use egcservices\Iugu\Exceptions\IuguException;

use egcservices\Iugu\Exceptions\IuguValidationException;

$iugu = new Iugu('SEU_TOKEN');

`

### Clientes

#### Criar cliente

`php

$customer = $iugu->customer()->create([

'name' => 'Lucas Colette',

'email' => 'lucas@bubb.com.br',

]);

// Imprime o ID do cliente

echo $customer['id'];

`

#### Atualizar cliente

`php

$customer = $iugu->customer()->update('ID_CLIENTE', [

'name' => 'John'

]);

`

#### Buscar cliente

`php

$customer = $iugu->customer()->find('ID_CLIENTE');

var_dump($customer);

`

#### Excluir cliente

`php

$iugu->customer()->delete('ID_CLIENTE');

`

### Cobran�as diretas

#### Criar cobran�a com boleto banc�rio

`php

$charge = $iugu->charge()->create([

'method' => 'bank_slip',

'email' => 'lucas@bubb.com.br',

'order_id' => uniqid(),

'payer' => [

'cpf_cnpj' => '65634052076',

'name' => 'Lucas Colette',

'phone_prefix' => '11',

'phone' => '11111111',

'email' => 'lucas@bubb.com.br',

'address' => [

'street' => 'Foo Bar',

'number' => '123',

'district' => 'Foo',

'city' => 'Foo',

'state' => 'SP',

'zip_code' => '14940000',

],

],

'items' => [

[

'description' => 'Item 1',

'quantity' => 1,

'price_cents' => 1000

],

[

'description' => 'Item 2',

'quantity' => 2,

'price_cents' => 2000

],

],

]);

`

#### Realizar pagamento de uma fatura com cart�o

`php

$charge = $iugu->charge()->create([

'invoice_id' => '12345678',

'token' => '0000000000000000' // Token gerado atrav�s da lib iugu.js

]);

`

## Faturas

#### Criar fatura

`php

$invoice = $iugu->invoice()->create([

'order_id' => uniqid(),

'email' => 'lucas@bubb.com.br',

'due_date' => '2018-07-14',

'notification_url' => 'https://webhook.site/08703bf2-d408-4f4c-b91c-0bc8e14352b2',

'fines' => false,

'perdayinterest' => false,

'discount_cents' => 500,

'ignoredueemail' => true,

'payablewith' => 'bankslip',

'items' => [

[

'description' => 'Item 1',

'quantity' => 1,

'price_cents' => 1000

],

[

'description' => 'Item 2',

'quantity' => 2,

'price_cents' => 2000

],

[

'description' => 'Frete',

'quantity' => 1,

'price_cents' => 1000

],

],

'payer' => [

'cpf_cnpj' => '65634052076',

'name' => 'Lucas Colette',

'phone_prefix' => '11',

'phone' => '11111111',

'email' => 'lucas@bubb.com.br',

'address' => [

'street' => 'Foo Bar',

'number' => '123',

'district' => 'Foo',

'city' => 'Foo',

'state' => 'SP',

'zip_code' => '14940000',

],

],

]);

// Imprime o ID da fatura

echo $invoice['id'];

`

#### Capturar fatura

`php

$iugu->invoice()->capture('ID_FATURA');

`

#### Buscar fatura

`php

$iugu->invoice()->find('ID_FATURA');

`

#### Reembolsar fatura

`php

$iugu->invoice()->refund('ID_FATURA');

`

#### Cancelar fatura

`php

$iugu->invoice()->cancel('ID_FATURA');

`

## M�todos de pagamento

#### Criar m�todo de pagamento

`php

$payment = $iugu->paymentMethod()->create('ID_CLIENTE', [

'description' => 'Cart�o de Cr�dito',

'token' => '123456',

]);

// Imprime o ID do pagamento

echo $payment['id'];

`

#### Atualizar m�todo de pagamento

`php

$iugu->paymentMethod()->update('IDCLIENTE', 'IDMETODO_PAGAMENTO', [

'description' => 'Outra description',

]);

`

#### Buscar m�todo de pagamento

`php

$iugu->paymentMethod()->find('IDCLIENTE', 'IDMETODO_PAGAMENTO');

`

#### Excluir m�todo de pagamento

`php

$iugu->paymentMethod()->delete('IDCLIENTE', 'IDMETODO_PAGAMENTO');

`

## Testando

`bash

$ composer test

`

## Change log

Consulte [CHANGELOG](.github/CHANGELOG.md) para obter mais informa��es sobre o que mudou recentemente.

## Contribuindo

Consulte [CONTRIBUTING](.github/CONTRIBUTING.md) para obter mais detalhes.

## Seguran�a

Se voc� descobrir quaisquer problemas relacionados � seguran�a, envie um e-mail para contato@bubbstore.com.br em vez de usar as issues.


All versions of iugu-extension with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
egcservices/iugu-php-sdk Version ^2.0
ext-json Version *
guzzlehttp/guzzle Version ^7.3.0
composer-runtime-api Version ^2.0
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 egcservices/iugu-extension contains the following files

Loading the files please wait ....