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

PHP Fatal error #2

Open
Vaatyk opened this issue Nov 23, 2018 · 1 comment
Open

PHP Fatal error #2

Vaatyk opened this issue Nov 23, 2018 · 1 comment

Comments

@Vaatyk
Copy link

Vaatyk commented Nov 23, 2018

When I try to connect to quickbook using php server to make my accounting app using the accounting api I get :

fatal error: uncaught quickbooksonline\api\exception\sdkexception: [0]: the code is not set. can't exchange for oauth 2 access token. thrown in /applications/xampp/xamppfiles/htdocs/helloworld-php/vendor/quickbooks/v3-php-sdk/src/core/oauth/oauth2/oauth2loginhelper.php on line 218.

I entered my keys correctly and didn't touch anything else, I also installed the v3-php-sdk

@ADTC
Copy link

ADTC commented Dec 5, 2018

Do you see error=invalid_scope in the callback URL?

Edit config.php and remove com.intuit.quickbooks.payment from the scope. Save your changes (this removes the Payments API from the scope).

Refresh the page before clicking "Connect to QuickBooks" again.

Are you using a Production company and you require Payments API?

Make sure that Payments is turned on and properly configured for your company.

ADTC added a commit to ADTC/HelloWorld-PHP that referenced this issue Dec 5, 2018
If the Connect to QuickBooks flow failed, this shows the error message received on the page so that the user can be alerted to fix the problem. Before this change, the callback page ignored the error and attempted to get a token anyway, resulting in a confusing PHP error message (see IntuitDeveloper#2).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants