forwebsystem / iugu
iugu PHP 库
v1.0
2022-08-15 17:11 UTC
Requires
- php: >=5.4
- ext-curl: *
- ext-json: *
- ext-mbstring: *
Requires (Dev)
- php-vcr/php-vcr: ^1.4
- phpunit/phpunit: ^6
This package is auto-updated.
Last update: 2024-09-29 06:20:29 UTC
README
要求
- PHP 5.4+
安装
$ composer require forwebsystem/iugu
Please provide a version constraint for the iugu/iugu requirement: 1.0.6
Composer 的自动加载将处理剩余部分。
使用示例
Iugu::setApiKey("c73d49f9-6490-46ee-ba36-dcf69f6334fd"); // Ache sua chave API no Painel Iugu_Charge::create( [ "token"=> "TOKEN QUE VEIO DO IUGU.JS OU CRIADO VIA BIBLIOTECA", "email"=>"your@email.test", "items" => [ [ "description"=>"Item Teste", "quantity"=>"1", "price_cents"=>"1000" ] ] ] );
文档
访问iugu.com/documentacao进行参考
请求日志
要捕获触发的请求,只需创建一个具有以下参数的函数
log_iugu_request($method, $url, $data, $exception ?? null, $response ?? null);
测试
安装依赖项
composer update
执行测试套件
composer tests