1. Go to this page and download the library: Download millancore/alegra 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/ */
millancore / alegra example snippets
use Alegra\Alegra;
use Alegra\Support\Country;
$alegra = Alegra::setCredentials([
'email' => '[email protected]',
'token' => 'tokenAuthApiAccess',
'country' => Country::COL
]);
$alegra->setLogger($PSRLogger);
$alegra->addListener($myListener);
use Alegra\Support\Facade\Item;
$product = Item::get(12);