intuit / QuickBooks-V3-PHP-SDK

Official PHP SDK for QuickBooks REST API v3.0: https://developer.intuit.com/
Apache License 2.0
241 stars 240 forks source link

Create a new Vendor, empty data returned #476

Open jplevene opened 1 year ago

jplevene commented 1 year ago

When I post a NEW vendor with the following code:

$contactObj = Vendor::create($contact_json);
$result = $dataService->Add($contactObj);

The vendor is created in the QuickBooks address book (no problems there), however $result is an empty object/array on success, basically it returns no data. The similar code works fine for a customer, it is only new vendors that I get the issue.

I am running the latest SDK using Composer, and minor version 63 (happened on 65 as well)

nuphunk commented 1 year ago

Same issue here - most frustrating!

sujitharamadass commented 1 year ago

I tried the sample in https://github.com/intuit/QuickBooks-V3-PHP-SDK/blob/master/src/_Samples/CreateVendor.php and was able to get the results in $resultingObj

dmytroderyshspd commented 4 months ago

Vendor::create should throw an exception but for some reason it does not. Check the last error by calling the getLastError method of the DataService class. It helped me with troubleshooting this error. In my case I received an error which says "The name supplied already exists".