QuickBooks Online API Diagnostics.php ERROR

妖精的绣舞 提交于 2019-12-11 08:57:37

问题


I am testing QuickBooks Online API by using the source code from the following URL: https://github.com/consolibyte/quickbooks-php

When I test the diagnostics.php http://mydomain.info/qb/docs/example_app_ipp_v3/diagnostics.php

I got the following error: Warning: array_merge(): Argument #2 is not an array in /home/mydomain.info/public_html/qb/docs/example_app_ipp_v3/diagnostics.php on line 15

The connection is fine.

Please advise


回答1:


If $creds is empty, it means that you have not yet established a valid OAuth connection to Intuit's servers.

You need to do that before anything is going to work. If you're just trying to get rid of the error, just cast $creds to an array.

To establish a connection, click the "Connect to QuickBooks" button that's shown on the /index.php script when you visit it in a browser. You'll be walked through the OAuth setup process (make sure you've changed the URLs, app token, and OAuth credentials in config.php first, and configured your URLs in your IPP app as well on Intuit's site).

Regarding your other questions:

  • $the_username and $the_tenant can be left at their defaults for testing.

  • In production, you will likely NEVER use $the_username (it's used only in very specific special circumstances). $the_tenant should be set to your unique tenant identifier within your SaaS app (or, if you're not a SaaS app, just leave it at it's default).



来源:https://stackoverflow.com/questions/19651453/quickbooks-online-api-diagnostics-php-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!