Comments (12)
what the F... I removed and reinstalled your library (I used dev-master), and now it works again (composer require picqer/exact-php-client)...
Weird...
from exact-php-client.
I also tried doing a cUrl request by myself with the same array of data and still get a 400 error... Very strange...
from exact-php-client.
When I use your example file it works... damn... weird stuff
from exact-php-client.
@it-can Did you get this in a specific version (after upgrading the package) or did it start while using the same version?
from exact-php-client.
Can you make sure, the client, after being redirected back (with the code query param) is given the code correctly?
from exact-php-client.
No not that I know of...
from exact-php-client.
You could try to var_dump the $body
right before the line you mentioned and see if all data is correctly set.
from exact-php-client.
I totally implemented the example file but still getting these errors...
from exact-php-client.
when I dump the $body variable I get this:
Array
(
[form_params] => Array
(
[redirect_uri] => https://test.site.com/exact/index
[grant_type] => authorization_code
[client_id] => *******-****-****-****-*******
[client_secret] => ******
[code] => *******************************************************************************************
)
)
I removed the codes because of security. But it appears to be correct I think
from exact-php-client.
That appears to be correct indeed. And the response from Exact?
On line 427 (after $response = ...
) you could dump the response:
Psr7\rewind_body($response);
var_dump($response->getBody()->getContents());
var_dump($response->getHeaders());
from exact-php-client.
doesn't work... it fails in the $response post() call
from exact-php-client.
Ok I have to try catch RequestException in guzzle, this is what I get:
Variable #1:
GuzzleHttp\Psr7\Response Object
(
[reasonPhrase:GuzzleHttp\Psr7\Response:private] => Bad Request
[statusCode:GuzzleHttp\Psr7\Response:private] => 400
[headers:GuzzleHttp\Psr7\Response:private] => Array
(
[Cache-Control] => Array
(
[0] => private
)
[Pragma] => Array
(
[0] => no-cache
)
[Content-Type] => Array
(
[0] => text/html
)
[Server] => Array
(
[0] => Microsoft-IIS/8.5
)
[X-AspNet-Version] => Array
(
[0] => 4.0.30319
)
[X-Powered-By] => Array
(
[0] => ASP.NET
)
[Content-Length] => Array
(
[0] => 11
)
[Date] => Array
(
[0] => Wed, 08 Jun 2016 08:21:32 GMT
)
[Connection] => Array
(
[0] => close
)
[Set-Cookie] => Array
(
[0] => ExactServer{****-****-****-****-***}=Division=1; path=/; secure; HttpOnly
[1] => PERSIST-EXACT=!FGfRdaRXFJ9I1JlQ2V6lc0njfPw****CVBBLW61jYStdSsXGGhk****************ugmAguQsI=;secure; HttpOnly; path=/
[2] => MCDCID=n4F****z****gZoR9****0Kg=********=; path=/; secure; HttpOnly
)
)
[headerNames:GuzzleHttp\Psr7\Response:private] => Array
(
[cache-control] => Cache-Control
[pragma] => Pragma
[content-type] => Content-Type
[server] => Server
[x-aspnet-version] => X-AspNet-Version
[x-powered-by] => X-Powered-By
[content-length] => Content-Length
[date] => Date
[connection] => Connection
[set-cookie] => Set-Cookie
)
[protocol:GuzzleHttp\Psr7\Response:private] => 1.1
[stream:GuzzleHttp\Psr7\Response:private] => GuzzleHttp\Psr7\Stream Object
(
[stream:GuzzleHttp\Psr7\Stream:private] => Resource id #136
[size:GuzzleHttp\Psr7\Stream:private] => 11
[seekable:GuzzleHttp\Psr7\Stream:private] => 1
[readable:GuzzleHttp\Psr7\Stream:private] => 1
[writable:GuzzleHttp\Psr7\Stream:private] => 1
[uri:GuzzleHttp\Psr7\Stream:private] => php://temp
[customMetadata:GuzzleHttp\Psr7\Stream:private] => Array
(
)
)
)
from exact-php-client.
Related Issues (20)
- Not able to Authorize HOT 1
- Requesting AccountItem results in 400 Bad Request - Error in query syntax HOT 2
- SalesOrderLines and SalesOrderOrderChargeLines HOT 2
- Client with identifier 'xxx-yyy-zzz' not found. HOT 5
- SalesEntry payments HOT 1
- What endpoint to get all articles?
- cURL error 77 HOT 4
- Provide a way to let exceptions bubble through to application HOT 7
- Picqer\Financials\Exact\Connection::upload() is missing optional parameters. HOT 1
- Referenced page is empty. Perhaps the endpoint is also removed? HOT 1
- PurchaseEntry approve for payment HOT 1
- PSR 18 compatibility HOT 3
- Error: Typed property Picqer\Financials\Exact\Connection::$minutelyLimitReset must not be accessed before initialization HOT 4
- Weird problem with paging and Documents/DocumentAttachment HOT 1
- Exception "Error 500: Not allow to update in Basic : Warehouse." HOT 7
- Error 401 with the message: "Unauthorized Client: Old refresh token used." HOT 6
- Strict type error HOT 11
- Could not connect to Exact Error 401: {"error":"unauthorized_client","error_description":"Old refresh token used."} HOT 8
- how to do an orderby HOT 3
- 429 errors HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from exact-php-client.