Tell the framework to load some data from the OAuth store QuickBooks for WINDOWS quick-start with PHPĮxample_ipp_ids_6.php load($the_username, $the_tenant) GitHub - open source QuickBooks PHP DevKit.Here is the link to the full code on GitHub: We also provide a wiki with lots of example qbXML requests that you can use.įrom the SDK,use example_ipp_ids_6.php for adding customers. You can find additional qbXML reference using the QuickBooks OSR. But we're just testing, so we'll just use a static test request: $record = mysql_fetch_array(mysql_query("SELECT * FROM your_customer_table WHERE your_customer_ID_field = ". Fetch your customer record from your database So, when you implement this for your business, you'd probably do ID = $ID from your database and build a request to add that particular You'd probably do some database access here to pull the record with Your code will end up looking something like: function _quickbooks_customer_add_request($requestID, $user, $action, $ID, $extra, &$err, $last_action_time, $last_actionident_time, $version, $locale) All you have to do in that example script is swap this variable:įor each new piece of functionality you want to add, you'll end up writing a new request and response function, as detailed in the QuickBooks Web Connector + PHP docs. QWC file will point to a PHP script which negotiates the connection between QuickBooks and PHP. QWC file which you'll load into the QuickBooks Web Connector (Start > All Programs > QuickBooks > Web Connector). That will walk you through setting up a simple Web Connector service which adds test customers to QuickBooks.īasically you'll create a. Use the QuickBooks for Windows + PHP quick-start guide instead. Again, start with the open source QuickBooks PHP DevKit from GitHub. The objects/methods available also mirror Intuit's documentation so you'll want to look at that.įor QuickBooks for Windows, you'll use the Web Connector. To implement additional functionality, you'll find other examples included in the code. If ($resp = $CustomerService->add($Context, $realm, $Customer)) $BillAddr->setCountrySubDivisionCode('MI') $BillAddr->setLine1('72 E Blue Grass Road') $BillAddr = new QuickBooks_IPP_Object_BillAddr() $Customer->setPrimaryPhone($PrimaryPhone) $PrimaryPhone = new QuickBooks_IPP_Object_PrimaryPhone() $Customer->setDisplayName('Keith R Palmer Jr '. $Customer = new QuickBooks_IPP_Object_Customer() The code ends up looking something like: $CustomerService = new QuickBooks_IPP_Service_Customer()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |