1. Go to this page and download the library: Download kyano-digital/wefact-php 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/ */
kyano-digital / wefact-php example snippets
use KyanoDigital\WeFact\WeFact;
$wefact = new WeFact(apiKey: 'your-api-key-here');
use KyanoDigital\WeFact\WeFact;
$wefact = new WeFact(apiKey: 'your-api-key-here');
$debtor = $wefact->debtors()->add([
'CompanyName' => 'Company Inc.',
'EmailAddress' => '[email protected]',
]);
use KyanoDigital\WeFact\Exceptions\WeFactException;
try {
WeFact::invoices()->add([...]);
} catch (WeFactException $e) {
// Human-readable message
$e->getMessage();
// Array of WeFact API error strings
$e->getApiErrors();
// Full raw API response
$e->getApiResponse();
}
bash
composer
bash
php artisan vendor:publish --tag=wefact
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.