Skip to content

tucuota/tucuota-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tucuota php client

Install

Via Composer

$ composer config repositories.repo git [email protected]:tucuota/tucuota-php.git
$ composer require tucuota/tucuota-php

Setup

Configure your credentials

use TuCuota\TuCuota;

// Use in sandbox (test mode)
$client = new TuCuota("REPLACE_THIS_FOR_YOUR_SANDBOX_API_TOKEN", "sandbox");

// Use in production
$client = new TuCuota("REPLACE_THIS_FOR_YOUR_API_TOKEN");

Examples

Customer

Create customer

$request = $client->post('customers', [
    "email" => "[email protected]",
    "name" => "Juan Tile",
    "metadata" => [
        'external_id' => 51,
    ],
]);

var_dump($request);

Get customers

$request = $client->get('customers');

var_dump($request);

Get customer

$request = $client->get('customers/CSvQwEV56Dp2');

var_dump($request);

Payments

Create payment

$request = $client->post('payments', [
    "description" => "Pago único",
    "customer_id" => "CSvQwEV56Dp2",
    "payment_method_number" => "4024007127322104",
    "amount" => 12000,
]);

var_dump($request);

Get payments

$request = $client->get('payments');

var_dump($request);

Get payment

$request = $client->get('payments/PYvQwEV56Dp2');

var_dump($request);

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

About

PHP library for the TuCuota API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages