![]() ![]() Solution: set your session_save_path('/var/www/temp') to a directory that exists and that Apache has access to (and, eventually, is secure) Warning: session_start(): open(/var/O_RDWR) failed: No such file or directory (2) in config.php on line 7 Here's all the things that wrong if you try to run Pearce's code by itself. I do not know yet how to properly handle the duplicate situation.Įverything that Can Go Wrong / From Pearce's version to mine Note that if you try to add a duplicate customer, you'll get Then, after listing 10 customers, the code will add customer "Eleven." I would guess you can add "11," but I did not care to find out at that point. You're adding exactly 16 non-whitespace characters. In the SDK root, change sdk.confg so that baseURL looks like the following the CDATA stuff-begin and end tag-are for XHTML compliance. Enter your OAuth Consumer Key and SecretĬhanging the PHP SDK sdk.config to sandbox mode.This is supposed to be a sandbox-only simple example to start from) The web server must have permission to write to that folder. if needed, change the session_save_path.You'll need the official PHP OAuth library installed.You'll need a LAMP (LAP) / WAMP (WAP) environment or something equivalent.If you're using the QuickBooks Online sandbox, you'll need to make two small changes in the SDK: see below.You need to make a number of changes in the config.php from my ZIP file: see below.With 5 files: config.php, index.php, oauth.php, ReadMe.txt, and license.txt (I don't remember exactly how I got that.) You need a QuickBooks Online sandbox account.(Getting those is described well on Intuit's site, as I recall, now that you know what to search for.) Within your account, you need to create an app and then its APP Token, OAuth Consumer Key, and OAuth Consumer Secret.I left Pearce's ReadMe and comments largely intact he talks to some extent about what you'd need in production.įirst, various Intuit account / security stuff: Amongst other issues, there are security issues with it. ![]() However, both my code and Pearce's is only for example purposes. It's still a great example overall, though, because it's small enough that I could debug it and get it working.īelow is my truly working code. ![]() His example is great in that it's tiny-the minimum needed for "hello world." Unfortunately, his example doesn't work, either, or at least it doesn't anymore. Pearce at Intuit (maker of QuickBooks) thought a better example was necessary-better than the 8MB of sample PHP code on Intuit's site. Home A QuickBooks PHP SDK / API example with OAuth THAT ACTUALLY WORKS as of 2015 / January "Hello World" is Non-Trivial ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |