I am using quickbook v3. I've downloaded PHP SAMPLE code from github and is runing well. It creates employee with ease but it's not creating a purchase order.
Here's what I've did so far..
$linedet = new IPPPurchaseOrderItemLineDetail();
$linedet->CustomerRef = 86;
$line = new IPPLine();
$line->Id = 0;
$line->Description = 'test purchase order';
$line->Amount = 2.00;
$line->DetailType= 'ItemBasedExpenseLineDetail ';
$line->ItemBasedExpenseLineDetail = $linedet;
$line->BillableStatus = 'Notbillable';
$line->ItemRef = '2';
$line->UnitPrice = '25';
$line->Qty = '1';
$purchaseOrder = new IPPPurchaseOrder();
$purchaseOrder->Line = $line;
$purchaseOrder->VendorRef = 85;
$purchaseOrder->APAccountRef = 1;
$purchaseOrder->TotalAmt = 200.00;
$result = $dataService->Add($purchaseOrder); //add purchase order
I get the following error when I run the above code
Fatal error: Uncaught IdsException: [0]: Argument Null Exception thrown in D:\xamp\htdocs\projectmanager\wp-content\plugins\quickbook-oauth\v3-php-sdk-2.0.5\DataService\DataService.php on line 312
While creating the purchase order through their api explorer also throws 400 error
Your help would be highly appreciated. Thanks