webiq/earny-php-client

Simple Earny API client

1.2.1 2016-04-26 13:28 UTC

This package is not auto-updated.

Last update: 2025-06-08 06:49:43 UTC


README

Simple wrapper for the Earny!

Examples. For more information about the Earny API, visit their documentation page.

Use this source at your own risk. Please report any bugs or improvements.

Add Draft
$earny_data = [
    'idcontact' => 1,
    'idpaymentmethod' => 2,
    'idtemplate' => 3,
    'language' => 'nl',
    'rules' => [[
        'idcategory' => 4,
        'idvatgroup' => 5,
        'productcode' => 6,
        'name' => 'Some Product name',
        'description' => 'Some cool description'
        'price' => 10.00,
        'amount' => 2
    ]],
];

// insert into the database
$earny = new Earny\Earny('your@username.com', 'withyourpassword');
$result = $earny->addDraft($earny_data);