在本地主机上运行QuickBooks PHP DevKit-IPP Intuit Anywhere演示应用程序
你好 我刚刚从中下载并安装了本地主机QuickBooks PHP DevKit-IPP Intuit Anywhere演示应用程序 然后我尝试访问“example\u app\u ipp\u v3”文件夹以运行我的应用程序 (也配置了config.php)在本地主机上运行QuickBooks PHP DevKit-IPP Intuit Anywhere演示应用程序,php,api,quickbooks,quickbooks-online,Php,Api,Quickbooks,Quickbooks Online,你好 我刚刚从中下载并安装了本地主机QuickBooks PHP DevKit-IPP Intuit Anywhere演示应用程序 然后我尝试访问“example\u app\u ipp\u v3”文件夹以运行我的应用程序 (也配置了config.php) 您是否使用Intuit提供的沙箱/开发凭据(而不是生产凭据)?您确定在Intuit的控制面板中正确设置了URL吗?听起来你好像在不同的环境中跳跃,可能有不匹配的东西。嗨,先生。。谢谢你路过。。对我正在使用我的开发凭据。。也许你对URL的看法是
您是否使用Intuit提供的沙箱/开发凭据(而不是生产凭据)?您确定在Intuit的控制面板中正确设置了URL吗?听起来你好像在不同的环境中跳跃,可能有不匹配的东西。嗨,先生。。谢谢你路过。。对我正在使用我的开发凭据。。也许你对URL的看法是正确的。。但是我不确定它出了什么问题。。因为我将vhost设置为“qbintegrations.com”,所以也将其添加到了我的主机文件中。。qbintegrations.com 127.0.0.1。。。所以在我的本地主机副本中,我将它们设置为qbintegrations.com/etc。。。还有…像什么不匹配的先生?例如因为我只是将paste从我的在线配置复制到我的本地主机,“仅更改url和db凭据”
<?php
/**
* Intuit Partner Platform configuration variables
*
* See the scripts that use these variables for more details.
*
* @package QuickBooks
* @subpackage Documentation
*/
// Turn on some error reporting
error_reporting(E_ALL);
ini_set('display_errors', 1);
// Require the library code
require_once dirname(__FILE__) . '/../../../QuickBooks.php';
// Your application token (Intuit will give you this when you register an Intuit Anywhere app)
$token = '961a033ab1294b4499bb04dbd0d14744c9ba';
// $token = '96262faa-cf42-424a-b7ff-7637a939a591';
// Your OAuth consumer key and secret (Intuit will give you both of these when you register an Intuit app)
//
// IMPORTANT:
// To pass your tech review with Intuit, you'll have to AES encrypt these and
// store them somewhere safe.
//
// The OAuth request/access tokens will be encrypted and stored for you by the
// PHP DevKit IntuitAnywhere classes automatically.
$oauth_consumer_key = 'qyprdZ5wvJ7vfPWWl0ez5kMRJlTF5H';
$oauth_consumer_secret = 'qv46uqwMemeMCb2FqllAnjOYMf4T4YOwU9eL02HG';
// 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://qbintegrations.com/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://qbintegrations.com/quickbooks-php/docs/partner_platform/example_app_ipp_v3/success.php';
// This is the menu URL script
$quickbooks_menu_url = 'http://qbintegrations.com/quickbooks-php/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://root:hack2help@localhost/qb_db';
// You should set this to an encryption key specific to your app
$encryption_key = 'bcde1234';
// Do not change this unless you really know what you're doing!!! 99% of apps will not require a change to this.
$the_username = 'DO_NOT_CHANGE_ME';