PHP code example of webiq / earny-php-client
1. Go to this page and download the library: Download webiq/earny-php-client library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
webiq / earny-php-client example snippets
$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);