Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forbidden request on specific exact environment #111

Closed
robinvalk opened this issue Jan 27, 2017 · 4 comments
Closed

Forbidden request on specific exact environment #111

robinvalk opened this issue Jan 27, 2017 · 4 comments

Comments

@robinvalk
Copy link
Contributor

robinvalk commented Jan 27, 2017

We successfully integrated the package in our application for quite a while now. Each user can use their own exact environment to log invoices, products, customers etc.

This was all working fine until recently, a specific user with a clean/newly created Exact environment get's a Forbidden response when we're trying to insert an invoice into their Exact environment. The OAuth procedure was succesful, we can even insert products and retrieve journals to work with.

I think it's probably a specific setting in Exact. Did anyone ever encounter the same issue?

Small stack trace:

  1. Picqer\Financials\Exact\SalesInvoice->save()
  2. Picqer\Financials\Exact\SalesInvoice->insert()
  3. Picqer\Financials\Exact\Connection->post('salesinvoice/Sa...', '{"Currency":"EU...')
  4. Request fails and is handled: Picqer\Financials\Exact\Connection>parseExceptionForErrorMessages(Object(GuzzleHttp\Exception\ClientException))
@yohancreemers
Copy link
Contributor

Did you check if this user has the permission to save?

$salesinvoices = new \Picqer\Financials\Exact\SalesInvoice($oConnection);
$b = $salesinvoices->userHasRights('PUT');

@GewoonRoy
Copy link

What i found out earlier was that the Account needs to have it's property 'isSales' on true to create SalesInvoices. It will probably have something to do with the permissions.

@robinvalk
Copy link
Contributor Author

Thanks for the answers, I'll come back to this tomorrow. Maybe they're willing to share their exact credentials. That willl make things a little easier.

@robinvalk
Copy link
Contributor Author

Today I saw in the exact environment that the salesinvoice menu item wasn't there either. I contacted support and they told me that we needed to step up our subscription one tier.

That will probably resolve my issue, I'll close it for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants