Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Exact Online Bundle Laravel Package

aibianchi/exact-online-bundle

View on GitHub
Deep Wiki
Context7

Author: Bianchi Jefferson

Website: https://aibianchi.com

Mail: Jefferson@aibianchi.com

Exact Online doc: https://support.exactonline.com/community/s/knowledge-base#All-All-DNO-Content-getting-started

branch for:

Symfony version 4.4

php version 7.2

Create your APP on : https://apps.exactonline.com/be/fr-BE/V2/Manage/

 composer require aibianchi/exact-online-bundle

Now you can use multi account ( by country )

config/package/exact_online.yaml

exact_online:
  Belgium:
    baseUrl:      https://start.exactonline.be/
    apiUrl:       api/v1
    authUrl:      api/oauth2/auth
    tokenUrl:     api/oauth2/token
    redirectUrl:  https://YOURURL/ExactRequest
    clientId:     YOURID
    clientSecret: YOURSECRET
  France:
    baseUrl:      https://start.exactonline.fr/
    apiUrl:       api/v1
    authUrl:      api/oauth2/auth
    tokenUrl:     api/oauth2/token
    redirectUrl:  https://YOURURL/ExactRequest
    clientId:     YOURID
    clientSecret: YOURSECRET
  Nerderland:
    baseUrl:      https://start.exactonline.nl/
    apiUrl:       api/v1
    authUrl:      api/oauth2/auth
    tokenUrl:     api/oauth2/token
    redirectUrl:  https://YOURURL/ExactRequest
    clientId:     YOURID
    clientSecret: YOURSECRET
  Spain:
    baseUrl:      https://start.exactonline.es/
    apiUrl:       api/v1
    authUrl:      api/oauth2/auth
    tokenUrl:     api/oauth2/token
    redirectUrl:  https://YOURURL/ExactRequest
    clientId:     YOURID
    clientSecret: YOURSECRET
php app/console doctrine:schema:update --force

In your controller :

use aibianchi\ExactOnlineBundle\Manager\ExactManager;

 public function indexAction(Request $request, ExactManager $exactManager)
{
    // the code sended by exact online when the first auth
    $code = $request->query->get('code');
    //$exactManager->init($code, "Belgium"); // use init for the first Authentification, after that you should to use refreshtoken();
      $exactManager->refreshToken("Belgium");
}

Next go to http:// YOUR URL.com/ExactRequest Your authentication login will be required, this session will expire after 10 minutes If you want to keep this session active, you should to replace function init() by refreshToken()

$code = $request->query->get('code');
$exactManager = $this->get("exact_online.manager");
//$exactManager->init($code); // first init
$exactManager->refreshToken(); // after first init 
$listAccount = $exactManager->getModel("Account")->getList(1,5);
foreach ($listAccount as $account){
	dump($account);
}
$criteria = array('AddressLine1' => 'Koningin Astridlaan 166');
$select   = array ("AddressLine1", "BusinessType", "CountryName", "Created");
$orderBy  = array('Created' => 'desc');
$limit    = 1 ;
$account  = $exactManager->getModel("Account")->findBy($criteria,$select,$orderBy,$limit);
dump($account);
account = $exactManager->getModel("Account")->find("587707b8-94aa-426a-b7db-56d434d9e83a");
$item = new Item();
$item->setCode(rand());
$item->setCostPriceStandard(5);
$item->setDescription("description de test");
$item->setIsSalesItem(true);
$item->setSalesVatCode('VN');
$exactManager->persist($item);
$account = $exactManager->getModel("Account")->find("587707b8-94aa-426a-b7db-56d434d9e83a");
$account->setWebsite("https://aibianchi.com");
$exactManager->update($account);
$account = $exactManager->getModel("Account")->find("587707b8-94aa-426a-b7db-56d434d9e83a");
$exactManager->remove($account);
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor