Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adhenrique/iugu-laravel
https://github.com/adhenrique/iugu-laravel
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/adhenrique/iugu-laravel
- Owner: adhenrique
- License: mit
- Created: 2017-02-23T19:05:16.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-24T21:57:18.000Z (almost 8 years ago)
- Last Synced: 2024-04-24T22:43:01.566Z (9 months ago)
- Language: PHP
- Size: 150 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Iugu para PHP
## Requisitos
* PHP 5.3+
## Instalação
Faça o download da biblioteca:
~~~
git clone https://github.com/iugu/iugu-php
~~~Inclua a biblioteca em seu arquivo PHP:
~~~
require_once(".../iugu-php/lib/Iugu.php");
~~~### Usando Composer
~~~
$ composer require iugu/iugu
Please provide a version constraint for the iugu/iugu requirement: 1.0.6
~~~O autoload do composer irá cuidar do resto.
## Exemplo de Uso
~~~
Iugu::setApiKey("c73d49f9-6490-46ee-ba36-dcf69f6334fd"); // Ache sua chave API no PainelIugu_Charge::create(
Array(
"token"=> "TOKEN QUE VEIO DO IUGU.JS OU CRIADO VIA BIBLIOTECA",
"email"=>"[email protected]",
"items" =>
Array(
Array(
"description"=>"Item Teste",
"quantity"=>"1",
"price_cents"=>"1000"
)
)
)
);
~~~## Documentação
Acesse [iugu.com/documentacao](http://iugu.com/documentacao) para referência
## Testes
Instale as dependências. Iugu-PHP utiliza SimpleTest.
~~~
composer update --dev
~~~Execute a comitiva de testes:
~~~
php ./test/Iugu.php
~~~