websmurf / laravel-exact-online Goto Github PK
View Code? Open in Web Editor NEWThis project forked from pendonl/laravel-exact-online
Laravel Exact Online wrapper around the PHP API
License: MIT License
This project forked from pendonl/laravel-exact-online
Laravel Exact Online wrapper around the PHP API
License: MIT License
How can we account for this before 1st of July? It's about the access token refresh interval rate. Currently it's 1 minute in Picqer package but it needs to become 30s.
Exact has a fairly new policy that if a token is not used for 30 days you should use a new authorization request in stead of a refresh token request:
https://support.exactonline.com/community/s/knowledge-base#All-All-DNO-Content-oauth-eol-oauth-devstep4
Could this be incorporated in this package? Right now, if you have a refresh token that is older than 30 days in your JSON config (stored on disk), the connection crashes on an error 400 because the refresh token is too old.
Hi there,
How can I utilize the $connection->setDivision($x) method from Picqer?
For the purpose of learning and understanding, I added this method to the LaravelExactOnline class, but it doesn't work:
public static function setDivision(Connection $connection, $division): void
{
$connection->setDivision($division);
}
Hi, earlier our laravel application used another exact online API with a different client ID and secret. I am willing to reconnect the application with a new API with a different client ID and secret.
Willing to reconnect the application gives: Could not connect to Exact: Error 400: {"error":"invalid_request","error_description":"The refresh token expired at 10/11/2022 9:18:20 PM and it is now 10/28/2022 4:15:50 PM."}.
I have the impression the wrapper is willing to use an old token (of the previous API). The exact.api.json file is empty. Can I manually influence this somehow? Thanks
Hi there,
Yesterday I succesfully deployed your Laravel wrapper to my Laravel-app (localhost). I was able to make queries to the Exact api. Today, I wanted to connect to the API again, but got the error "Could not acquire or refresh tokens [http 400]" after pressing the button "connect to Exact".
I am basically familair with the OAuth of Exact. Is there anything I can do manually to reconnect? I installed the package yesterday, so I believe i am running the latest version. Thanks in advance.
Hi there!
I keep getting the following error. Even though it is only five minutes since a token was issued. Do you have any idea what this could be?
{ "error":"invalid_grant","error_description":"Token is not allowed, because of invalid or empty chainId" }
Thanks
Hi,
When we try to use the library in just Laravel it works fine, but when we implement it in Queue's (async) after a couple of requests the library loses the refresh token.
Do you have any idea to fix this? The queue is configured to only run one task at a time to prevent tokens from being lost.
I am using laravel 8.82.0 on locahost and trying to implement laravel-exact-online sdk there. Also i am using wp database.
First of all using this command (composer require websmurf/laravel-exact-online) its not fully installed the sdk as its missed route and controller files . So i have tried create the route and controller manually and have implemented it within the project. After that when i am running http://127.0.0.1:8000/exact/connect it always giving following error: Route [login] not defined.
Here is the route code i made for latest laravel version which i put on routes/web.php :
Route::group(['middleware' => ['web','auth'] ], function(){
Route::get('/exact/connect', [ LaravelExactOnlineController::class ,'appConnect'])->name('exact.connect');
Route::post('/exact/authorize', [ LaravelExactOnlineController::class ,'appAuthorize'])->name('exact.authorize');
Route::get('/exact/oauth', [ LaravelExactOnlineController::class ,'appCallback'])->name('exact.callback');
});
when i am removing the 'auth' from the middleware then route is working but then its giving another error which is from view file : View [layouts.app] not found. (View: C:\xampp\htdocs\dashboard.automatezo\resources\views\vendor\laravelexactonline\connect.blade.php)
The sdk route code is of older version that may be the cause. Please help me with this.
Since the update of the Exact Online API that I need an HTTPS callback URI, the package no longer works.
I have installed an SSL certificate on my development environment and it still doesn't work. I keep getting the error "Callback URI 'https://mycompany.test/exact/oauth' is not valid", but in the App Center I entered "https://mycompany.test" as my callback URI.
I have a question regarding the use of task schedules in Laravel.
I created a job that uses your library to connect to Exact, with multi_user enabled. When I am logged in to my app I can start the job manually which fetches the latest data from Exact. That's working. Now, I want to schedule a task which executes the job every night. But I am strugling a bit. Somehow, I need to use an "User" in the sync job (to update the refresh tokens etc.).
What's the best approach for this?
Update:
For the sake of trial and error: I changed
At this point if a connection error occurs (resulting in the infamous 401 Could not acquire or refresh tokens error) all other code will fail to execute as well (since it just stops at this).
Since we only need to check the connection if we actually use the ExactOnline object, we only need to instantiate the class at that point as well.
When trying to reconnect app with Exact online, I am always getting:
"Could not connect to Exact: Error 400: {"error":"invalid_request","error_description":"The refresh token expired at 11/3/2021 2:50:46 PM and it is now 7/31/2022 7:45:12 PM."}"
Any ideas how I can overcome this? I already tried to remove authorities in Exact Online itself, which had no result. The code stops at rule: websmurf/laravel-exact-online/src/Providers/LaravelExactOnlineServiceProvider.php, rule 80.
Hi, we are having a sync of contacts and lots of products, we're calling a few endpoints after another and bumping into our rate limit. Exact has sync endpoints, how do we call them using this client? Thanks in advance
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.