Consolibyte Quickbooks 连接问题

Consolibyte Quickbooks Connection Problem

我正在尝试从 Consolibyte "docs/partner_platform/example_app_ipp_v3/index.php" 文件将我的网站(在开发人员模式下,因此沙盒为真,非 https)连接到 Intuit,但我不断收到以下错误:

Uh oh, there’s a connection problem. Sorry, but the app didn’t connect. Please try again later, or contact customer support for help.

View error details (for Developers) The redirect_uri query parameter value is invalid. Make sure it is listed in the Redirect URIs section on your app's keys tab and matches it exactly. Click here to learn more about the redirect_uri query parameter.

我已经在我的 intuit 开发者帐户中为这个应用程序设置重定向 URI 到相同的 Return URL 在 Consolibyte config.php (docs/partner_platform/example_app_ipp_v3/success.php), 但它仍然无法正常工作。

我是不是做错了什么?我正确地遵循了快速入门指南中的所有内容。

config.php代码:

$oauth_client_id = '***';
$oauth_client_secret = '***';

// If you're using DEVELOPMENT TOKENS, you MUST USE SANDBOX MODE!!!  If you're in PRODUCTION, then DO NOT use sandbox.
$sandbox = true;     // When you're using development tokens
//$sandbox = false;    // When you're using production tokens

// This is the URL of your OAuth auth handler page
$quickbooks_oauth_url = 'http://www.***.com/quickbooks/docs/partner_platform/example_app_ipp_v3/oauth.php';

// This is the URL to forward the user to after they have connected to IPP/IDS via OAuth
$quickbooks_success_url = 'http://www.***.com/quickbooks/docs/partner_platform/example_app_ipp_v3/success.php';

// This is the menu URL script
$quickbooks_menu_url = 'http://www.***.com/quickbooks/docs/partner_platform/example_app_ipp_v3/menu.php';

// This is a database connection string that will be used to store the OAuth credentials
// $dsn = 'pgsql://username:password@hostname/database';
// $dsn = 'mysql://username:password@hostname/database';
$dsn = 'mysqli://***_intuit:***@localhost/***_quickbooks';

// You should set this to an encryption key specific to your app
$encryption_key = '***';

// Scope required
$scope = 'com.intuit.quickbooks.accounting ';

// The tenant that user is accessing within your own app
$the_tenant = 12345;

您的重定向 URL 不匹配。

  • 在 Intuit 的控制面板中,它以 success.php 结尾。
  • 在您的配置中,它以 oauth.php 结尾。

两个URL必须完全匹配

此外,请确保您使用的是 https://github.com/consolibyte/quickbooks-php 的最新代码 - 如果您使用的是最新代码,您应该有一个 config_oauthv2.php 文件,而不仅仅是 config.php .