intuit / QuickBooks-V3-PHP-SDK

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

Bill::create silently failing #506

Open hyphen81 opened 11 months ago

hyphen81 commented 11 months ago

I'm calling the Bill and/or VendorCredit facade like so:

Bill::create([
[
      'DocNumber' => '12345678',
      'TxnDate' => 2023-12-06,
      'Line' => [
        'DetailType' => 'AccountBasedExpenseLineDetail',
        'Amount' => 23.12,
        'AccountBasedExpenseLineDetail' => [
          'AccountRef' => [
            'value' => 150
          ]
        ]
      ],
      'VendorRef' => [
        'value' => 175
      ]
    ]
])

However, nothing gets returned. I added some logging to the bill class, and I can see the data that's passed in is correct, but it never gets to the second log statement. It seems to be silently failing somewhere and I can't figure out where.

Seems to be something in the FacadeHelper::reflectArrayToObject method.

 Log::debug($data);
        $BillObject = FacadeHelper::reflectArrayToObject("Bill", $data, $throwException);
        Log::debug($BillObject); <-- never gets here

Has anyone else run into this?