Quickbooks联机使用来自GitHub的Quickbooks PHP中的PHP



我正在使用GitHub中的quickbooks php。版本为quickbooks php-master\docs\partner_platform\quickbooks-php-master/docs\partner_platform\example_app_ipp_v3。

我在三四年前使用过这个版本,它还可以。最近我想在一个项目中再试一次。自从我上次使用它以来,他们只使用OAUTH1,现在他们使用OAUTH2登录,我无法连接到我的Sandbox帐户。当php代码试图返回公司名称时,我遇到了一个一般错误。

我的问题是,我是否需要对quickbooks php master\docs\partner_platform\example_app_ipp_v3版本进行更改,以使其重新工作。我有来自开发人员网站的开发密钥(客户端ID和客户端机密)。

config.php文件是放置这些密钥的位置:$token = 'xxx'; oauth_consumer_key='xxx';`$oauth_consumer_secret='xxx';

这些键的名称已经更改,因此这些键是否可以以这种方式工作有点混乱。

所以主要的问题是example_app_ipp_v3与OAUTH2一起工作吗?如果可以,你能告诉我需要做的更改吗。

这方面的任何帮助都将是伟大的。如果这个版本不适用于OAUTH2,我只需要知道情况是否如此,这样我就可以尝试其他方法。

OAuth2.0支持正在推出。点击此处查看迁移指南:

  • https://github.com/consolibyte/quickbooks-php#oauth-10到20岁移民

以及最新的更新。更多更新即将到来。配置代码进行了一些更改,以适应新的OAuth 2.0要求:

$oauth_client_id = 'Q0ql65UCww8oAoiXfNdVyZ5WHoZ0kJ43XqstMhxGtM2UuA5WKu';
$oauth_client_secret = 'S60VXMXFygEOcb08DleS8iePUFyH81i4FhVrKaAB';
$sandbox = true;     // When you're using development tokens
// This is the URL of your OAuth auth handler page
$quickbooks_oauth_url = 'http://sandbox.test/quickbooks-php/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://sandbox.test/quickbooks-php/docs/partner_platform/example_app_ipp_v3/success.php';
// This is the menu URL script
$quickbooks_menu_url = 'http://sandbox.test/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 = 'mysqli://dev:password@localhost/quickbooks';
// You should set this to an encryption key specific to your app
$encryption_key = 'bcde1234';
// Scope required
$scope = 'com.intuit.quickbooks.accounting ';
$IntuitAnywhere = new QuickBooks_IPP_IntuitAnywhere(
QuickBooks_IPP_IntuitAnywhere::OAUTH_V2,
$sandbox,
$scope,
$dsn,
$encryption_key,
$oauth_client_id,
$oauth_client_secret,
$quickbooks_oauth_url,
$quickbooks_success_url);

最新更新