Skip to content

Interface de comunicação com a API do Iugu para Laravel

Notifications You must be signed in to change notification settings

jprodrigues70/iugu-laravel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

iugu-laravel

Interface de comunicação com a API do Iugu para Laravel

exemplo de uso até o momento:

$user = User::find(1);
$invoice = new InvoiceBuilder();
$result = $invoice
    ->setEmail($user->email)
    ->setDueDate(Carbon::now()->addDays(3)->format("Y-m-d"))
    ->setPayer(
        name: $user->name,
        documentNumber: $user->cpf
    )
    ->setItem(
        description: 'Fatura de teste',
        quantity: 2,
        priceCents: 100
    )
    ->setLocalPersistenceConfig(
        model: new Invoice(),
        map: [
            'gatewayColumn' => 'service',
            'id' => 'service_id',
            'total_cents' => 'price'
        ],
        data: [
            'user_id' => $user->id,
        ]
    )
    ->create();

About

Interface de comunicação com a API do Iugu para Laravel

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages