Exception: QuickBooks Online returned an error.
Debug Info:
- $strURL: 'https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer'
- $headers:
[
"Authorization: Basic QUJwdjN0ZHZhbU1yWjVYazNrNXNZUlA5cW53elo4blhTRWpJQTNQUTF6WGwxUzlPWmM6czA4VGh4aDdYTkwyUEZneTN4a05RNFIyeGJvcVlsazNWZEd1RTZWUg==",
"Content-Type: application\/x-www-form-urlencoded"
]
- $arrGET: NULL
- $arrPOST: 'grant_type=authorization_code&code=XAB117615868893Xu6MNtqqXl5jJV6JHoJpDxUGz8URivHRNlh&redirect_uri=https://www.oncord.com/clientapi/external_oauth.php'
- $arrResponse: {
"error": "invalid_grant",
"error_description": "Token invalid"
}
- $iResponseCode: 400
in /usr/lib/php/Oncord/beta/Components/Settings/Apps/QuickBooksOnline/API/API.inc.php line 239
Call Stack
| Tag / Object |
Function |
Called From |
|
|
|
#239 API.inc.php |
|
|
Components\Settings\Apps\QuickBooksOnline\API::makeRequest('https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer', 'POST', null, 'grant_type=authorization_code&code=XAB117615868893Xu6MNtqqXl5jJV6JHoJpDxUGz8URivHRNlh&redirect_uri=https://www.oncord.com/clientapi/external_oauth.php', Array[2]) |
#281 API.inc.php |
|
|
Components\Settings\Apps\QuickBooksOnline\API::getAccessTokens('XAB117615868893Xu6MNtqqXl5jJV6JHoJpDxUGz8URivHRNlh') |
#7 Custom PHP |
|
|
eval() |
#1281 functions.inc.php |
|
|
evalOuter('if(isset($_GET['code']))
{
// activate QuickBooks integration
$arrTokens = \Components\Settings\Apps\QuickBooksOnline\API::getAccessTokens($_GET['code']);
// save the realmId / company ID
\Components\Settings\ConfigurationItems::saveValueEncrypted('\Components\Settings\Apps\QuickBooksOnline', 'company_id', $_GET['realmId']);
// save the API credentials
\Components\Settings\Apps\QuickBooksOnline\API::saveTokens($arrTokens);
// install the app component
\Components\Settings\Apps\QuickBooksOnline::install();
// we need to set a default synctime_sales so that when a sync happens for the first time, last sync time will start from the time QBO is installed
if (!\Components\Settings\Apps\QuickBooksOnline::configGetValue('synctime_sales'))
\Components\Settings\Apps\QuickBooksOnline::configSaveValue('synctime_sales', time());
// save the QBO company name
\Components\Settings\ConfigurationItems::saveValue('\Components\Settings\Apps\QuickBooksOnline', 'connected_company', \Components\Settings\Apps\QuickBooksOnline\CompanyInfo::getCompanyName());
// save the connected user email
\Components\Settings\ConfigurationItems::saveValue('\Components\Settings\Apps\QuickBooksOnline', 'connected_user_email', \Components\Settings\Apps\QuickBooksOnline\API::getConnectedUserEmail());
\Framework\HTTP\Redirection::redirect('/admin/settings/apps/quickbooksonline/configuration');
}
if(isset($_GET['disconnect']))
{
// disconnect QBO account
try
{
\Components\Settings\Apps\QuickBooksOnline\API::revokeAccessToken();
}
catch (\Framework\Exceptions\Generic $pException)
{}
\Components\Settings\ConfigurationItems::deleteValue('\Components\Settings\Apps\QuickBooksOnline', 'connected_company');
\Components\Settings\ConfigurationItems::deleteValue('\Components\Settings\Apps\QuickBooksOnline', 'connected_user_email');
\Framework\Toasts::sessionToastAdd([
'type' => 'success',
'message' => 'Account disconnected successfully.'
]);
\Framework\HTTP\Redirection::redirect('/admin/settings/apps');
}', '\Components\Website\Pages::/admin/settings/apps/quickbooksonline/connect/') |
#157 SSInclude.inc.php |
|
Page: /admin/settings/apps/quickbooksonline/connect/
|
|
<logic:include page="/admin/settings/apps/quickbooksonline/connect/"> |
Controls\Logic\SSInclude::initialize() |
#141 Content.inc.php |
|
# 53 <regions:content> |
Controls\Regions\Content::initialize() |
#456 NodeABC.inc.php |
|
# 79 <ajax:region> |
Controls\AJAX\Region::initialize() |
#456 NodeABC.inc.php |
|
# 39 <logic:else> |
Controls\Logic\SSIfElse::initialize() |
#456 NodeABC.inc.php |
|
# 33 <logic:if> |
Controls\Logic\SSIf::initialize() |
#456 NodeABC.inc.php |
|
Design: Website Management Console
|
|
#document |
Framework\DOM\Nodes\NodeABC::initialize() |
#1399 functions.inc.php |