I've got OAuth working for creating a customer then loading that customer via their customer ID
However when I try to use the "query" endpoint to find a customer by name, it fails me.
I'm using Laravel and the PHPoAuthLib library. My code looks like so:
$oauth = OAuth::consumer('QuickBooks');
$oauth_token = unserialize(file_get_contents(storage_path("tokens/saved_data.txt")));
$storage = $oauth->getStorage();
$storage->storeAccessToken('QuickBooks', $oauth_token['access_token']);
// Check for Quickbooks donor
$result = $oauth->request("/v3/company/" . $oauth_token['company_id'] . "/query?query=SELECT * FROM Customer MAXRESULTS 1", "GET");
return $result;
This is returning a 400 error with the message "Unknown Version"
Trying to google this error suggests it might be an issue in signature generation.