rangka / quickbooks Goto Github PK
View Code? Open in Web Editor NEWPHP Library for connecting to QuickBooks.
License: MIT License
PHP Library for connecting to QuickBooks.
License: MIT License
Hi,
After playing with the official PHP SDK a bit and getting frustrated with it, I checked for an alternative and this is just brilliant. Well done and thanks for creating this.
Best regards,
René
How to create new Bill with multiple line items?
Thanks for answer.
As of php Boolean value is being converted to either 1 or 0 while Quickbooks does not accept such parameters for Boolean values and will throw error as of value 1/0 is not recognized for such parameter
.
I've faced the issue while fetching jobs for the customer.
$this->jobService->query()
->where('Job', '=', true)
->paginate($this->start, $this->offset)
->get();//throws error value 1 is not valid for property 'Job'
I've come up with solution by adding a method for Bool values which fix that.
Would you please add this code in Query.php or let me know if there is any alternate solution.
public function whereBool($property, $operator, $constraint) {
if($constraint === true) {
$this->where[] = $property. $operator . "true";
} else {
$this->where[] = $property. $operator . "false";
}
return $this;
}
Or another solution would be
public function whereTrue($property, $operator) {
$this->where[] = $property. $operator . "true";
return $this;
}
public function whereFalse($property, $operator) {
$this->where[] = $property. $operator . "false";
return $this;
}
Thanks
"AttachableRef": [
{
"EntityRef": {
"value": "95",
"type": "Invoice"
},
"IncludeOnSend": false
}
When I try to paginate the customers or vendors something like
try {
$results = $this->customerService->query()->paginate(0, 1000)->get();
} catch (\Exception $e) {
return response()->json([ 'success' => false, 'message' => $e->getMessage() ]);
}
maxresults\" \"MAXRESULTS \"\" at line 1, column 38.\nWas expecting:\n <INTEGER>
As we already know that it accepts start and offset as an integer.
Please fix it ASAP.
Thanks
Hey
I'm trying to generate a token, but when the user gives access to the app and returns on the callback and I execute:
$connector = new Connect;
$result = $connector->connect($_GET);
I get:
Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: `GET https://oauth.intuit.com/oauth/v1/get_access_token?oauth_consumer_key=<removed>&oauth_nonce=94XOiIMxq8&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1477409108&oauth_token=qyprdDloPAuo924wDURniAFMgUFgRGigr8OpnRbJta3qRRgj&oauth_verifier=734z6xe&oauth_version=1.0&oauth_signature=PKBdCWeRGTfPF1G20%2F0unTlIEZg%3D` resulted in a `401 Unauthorized` response:
oauth_problem=signature_invalid
in /Users/gecko/Web/Code/_work/quickbooks/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:111
Stack trace:
#0 /Users/gecko/Web/Code/_work/quickbooks/vendor/guzzlehttp/guzzle/src/Middleware.php(65): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response))
#1 /Users/gecko/Web/Code/_work/quickbooks/vendor/guzzlehttp/promises/src/Promise.php(203): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response))
#2 /Users/gecko/Web/Code/_work/quickbooks/vendor/guzzl in /Users/gecko/Web/Code/_work/quickbooks/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 111
Can you advice to solve this issue?
Thank you,
Gecko
When vendor is created in return request I don'g get Vendor's ID. Is it normal? If it is, how can I get this Id number?
PHP Fatal error: Class '\Rangka\Quickbooks\Builders\class' not found in /var/www/html/kpi/vendor/rangka/quickbooks/src/Services/Service.php on line 87
{"error":{"type":"Symfony\Component\Debug\Exception\FatalErrorException","message":"Class '\Rangk
a\Quickbooks\Builders\class' not found","file":"/var/www/html/kpi/vendor/rangka/quickbooks/
src/Services/Service.php","line":87}}
Hi,
In the Service model there is a static class variable that is access through $this-> a few time.
PHP Generates warning for this.
Shouldn't that variable declaration be:
protected $responseHasRoot = true;
It's set to false in TaxService.php .
class QBClass extends Service {
/**
* Name of this service. Must correspond to actual objecet type in Quickbooks.
* @var string
*/
protected static $name = 'class';/** * Resource name of this service. Must correspond to actual objecet type in Quickbooks and in all lowercase. * @var string */ protected static $resource_name = 'Class';
}
But when I changed the $name to 'Class', it works. Please verify if it should be capitalize?
First of all thanks for the great and enhanced Quickbooks package. Could you please also add delete operation on services. currently I've just modified the Service class with adding just a new method for delete operation which just works fine for Quickbooks Bill though I've not tested with other Services. Would you please add the below code to the Service or may I sent a pull request over this issue.
Thanks
/**
* Delete an entity.
*
* @param array $data Item information.
* @return void
*/
public function delete($data) {
return parent::post($this->getResourceName() . '?operation=delete', $data)->{$this->getEntityName()};
}
When i try to create new Vendor every things work fine, but when i try update i get exception like
Calling undefined method in Rangka\Quickbooks\Builders\Vendor
this is my code:
$ex = getVendorByID( $vendor->Id );
$syncToken = $ex->SyncToken;
$service = new Vendor();
$builder = $service->getBuilder();
$builder->setDisplayName( $ex->DisplayName );
$builder->setPrimaryEmailAddr( [
'Address' => $ex->PrimaryEmailAddr->Address
] );
$builder->setBillAddr( [
"Line1" => $address['address1'],
"Line2" => $address['address2'],
"City" => $address['city'],
"Country" => $address['country'],
"CountrySubDivisionCode" => $address['state'],
"PostalCode" => $address['postal_code'],
] );
$builder->setPrimaryPhone( [
'FreeFormNumber' => $ex->PrimaryPhone->FreeFormNumber
] );
$builder->setSyncToken( $syncToken );
$ret = $builder->update();
Sync token are set and all variables like address, phone and email address.
createVendor function is on the same file and Rangka\Quickbooks\Services\Vendor is declared properly on top
How to fix this? Where is the issue?
Thanks
Hi, thought id let you know i'm seeing the error "Notice: Undefined index: query" when using the library in symfony. (a simple isset($parsedURL['query'] should fix it)
Client.php line 116
Cheers
Paul
Service Request: can you add service for uploading of attachment for invoice
Here is a list of services that are still being implemented.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.