- PHP 7.0+
$ composer require unaspbr/iugu-php
O autoload do composer irá cuidar do resto.
Iugu::setApiKey("c73d49f9-6490-46ee-ba36-dcf69f6334fd"); // Ache sua chave API no Painel
Charge::create(
[
"token"=> "TOKEN QUE VEIO DO IUGU.JS OU CRIADO VIA BIBLIOTECA",
"email"=>"[email protected]",
"items" => [
[
"description"=>"Item Teste",
"quantity"=>"1",
"price_cents"=>"1000"
]
]
]
);
Acesse iugu.com/documentacao para referência
Para usar essa biblioteca no Laravel, ver mateusfccp/iugu-laravel.