pbrzoski / freshbooks-php-library Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/freshbooks-php-library
Automatically exported from code.google.com/p/freshbooks-php-library
vat_name and vat_number are missing from the Client class.
Ideally, you should be able to call:
``$client->vatName = 'ABN';''
``$client->vatNumber = '73 152 267 xxx';''
before calling ``$client->create();''
in order to have a VAT number or ABN number show up on a Invoice for taxation
purposes.
In Australia, this is a legal requirement for a valid Tax Invoice.
Original issue reported on code.google.com by [email protected]
on 24 Dec 2013 at 5:43
What steps will reproduce the problem?
1. Use FreshBooks_Invoice::get() to get an existing invoice.
2. Call FreshBooks_Invoice::update() to update the invoice.
3. Examine the value for the $invoiceId field of the invoice.
What is the expected output?
The $invoiceId field of the invoice object should still contain the invoice ID.
What do you see instead?
The invoice ID is empty. This is because in
FreshBooks_ElementAction::update(), _internalPrepareCreate() is called
instead of _internalPrepareUpdate(), and _internalCreate() is called
instead of _internalUpdate() .
What version of the product are you using?
FreshBooks PHP 1.2
Original issue reported on code.google.com by [email protected]
on 17 Apr 2010 at 10:55
A new field was added to all FreshBooks items, called a folder.
There are three types of folders:
Active
Archived
Deleted
These determine what state the item is in, and the library currently does not
support them at all.
Original issue reported on code.google.com by [email protected]
on 14 Apr 2011 at 11:06
Typo in method's name: I think the FreshBooks_Recurring::sendMail() should be
FreshBooks_Recurring::sendByMail()
Note: There is already a property named "sendMail" to match the XML parameter
for the Recurring calls.
Original issue reported on code.google.com by [email protected]
on 23 Aug 2010 at 5:59
Add staff_id to XML Generation in TimeEntry.php around line 40 with the
following snippet:
<code>
$this->_getTagXML("staff_id",$this->staffId) .
</code>
Original issue reported on code.google.com by [email protected]
on 13 Nov 2010 at 10:24
What steps will reproduce the problem?
Enter special HTML characters (i.e < > & ) into any create/modify/listing and
it will fail.
What is the expected output? What do you see instead?
For example, creating an item with the name Test& would result in the following
XML:
<item>
<name>Test&</name>
</item>
When it should be:
<item>
<name>Test&</name>
</item>
Original issue reported on code.google.com by [email protected]
on 1 Apr 2011 at 11:25
FB API says it's included on the response, however the Client class seems to be
ignoring them
Original issue reported on code.google.com by [email protected]
on 3 Oct 2011 at 7:14
1. Create a new Invoice.
2. Call $invoice->invoiceId.
3. You get a string such as (var_dump output below):
string(6) "324319"
The problem with this is that the correct format is:
string(11) "00000324319"
This is evident if you attempt to call $invoice->get('324319') - it will fail
because no such invoice exists. Whereas, $invoice->get('00000324319') works.
Original issue reported on code.google.com by [email protected]
on 28 Dec 2013 at 10:30
Hi,
I am trying to create payment using freshbooks api, but its not working. Here is my code:
$payment = new FreshBooks_Payment();
$payment->invoiceId = $invoice->invoiceId;
$payment->clientId = $invoice->clientId;
$payment->amount = $data['amount'];
$payment->type = $data['payment_type'];
$payment->notes = $data['comment'];
$payment->create();
Its not throwing any error also.
If I write echo "yes"; after $payment = new FreshBooks_Payment();. Its not
printing anything.
Please help me to resolve this issue.
Thanks,
Chandra.
Original issue reported on code.google.com by [email protected]
on 3 Jul 2012 at 2:21
It seems that the library (as it currently stands) doesn't allow for usage of
get() to grab Invoice data. As far as I can work out, there is also no way to
update() invoices.
Example usage:
FreshBooks_HttpClient::init(FRESHBOOKS_URL,FRESHBOOKS_TOKEN);
$invoice = new Freshbooks_Invoice();
$invoice->invoice_id = '00000324300';
if (!$invoice->get('00000324300')) {
die($invoice->lastError);
}
else {
print_r($invoice);
}
This returns the error message: 'invoice_id' not found. Invoice not found.
I've also tried supplying the Invoice ID in other formats, e.g: invouce Number
(0000172) and that doesn't help either.
Original issue reported on code.google.com by [email protected]
on 28 Dec 2013 at 3:44
The current time-out is set to 4 seconds in HttpClient::_init(), but this
timeout can be too short if the FreshBooks site is under heavy load, or if
an auto-bill subscription is being set-up (it looks like FreshBooks
attempts to perform the credit card charge while handling the request).
I recommend increasing the time-out to a more standard 30 seconds, as this
is much less likely to fail.
Original issue reported on code.google.com by [email protected]
on 21 Apr 2010 at 12:29
What steps will reproduce the problem?
1. Use FreshBooks_Invoice::get() to get an existing invoice.
2. Call FreshBooks_Invoice::update() to update the invoice.
What is the expected output?
No errors will be returned by the FreshBooks site.
What do you see instead?
The FreshBooks server returns errors about the following fields:
* amount
* amount_outstanding
* links
* recurringId
This is because _internalXMLContent() in Invoice and BaseInvoice include
fields in the XML payload that are marked read-only in the FreshBooks API.
These fields should be excluded from what is sent to the server.
What version of the product are you using?
FreshBooks PHP 1.2
Original issue reported on code.google.com by [email protected]
on 17 Apr 2010 at 11:02
Hi, can you please extend the code to use prorate_days when doing a
recurring.create?
Thanks :)
Original issue reported on code.google.com by [email protected]
on 18 Mar 2015 at 10:53
What steps will reproduce the problem?
1. Download current version
2. Run example.php
What is the expected output? What do you see instead?
Some sort of client info is what I expect, instead I get a repeating XML parse
error:
php example.php
PHP Warning: simplexml_load_string(): Entity: line 79: parser error :
xmlParseEntityRef: no name in
/home/stk/Desktop/freshbooks-api/library/FreshBooks/Element.php on line 74
PHP Stack trace:
PHP 1. {main}() /home/stk/Desktop/freshbooks-api/example.php:0
PHP 2. FreshBooks_ElementAction->get()
/home/stk/Desktop/freshbooks-api/example.php:16
PHP 3. FreshBooks_Element->_sendRequest()
/home/stk/Desktop/freshbooks-api/library/FreshBooks/ElementAction.php:62
PHP 4. simplexml_load_string()
/home/stk/Desktop/freshbooks-api/library/FreshBooks/Element.php:74
PHP Warning: simplexml_load_string(): if ((version >= 5.5) && (version < 7)
&& (document.body.filters)) { in
/home/stk/Desktop/freshbooks-api/library/FreshBooks/Element.php on line 74
PHP Stack trace:
PHP 1. {main}() /home/stk/Desktop/freshbooks-api/example.php:0
PHP 2. FreshBooks_ElementAction->get()
/home/stk/Desktop/freshbooks-api/example.php:16
PHP 3. FreshBooks_Element->_sendRequest()
/home/stk/Desktop/freshbooks-api/library/FreshBooks/ElementAction.php:62
PHP 4. simplexml_load_string()
/home/stk/Desktop/freshbooks-api/library/FreshBooks/Element.php:74
What version of the product are you using? On what operating system?
1.2
Please provide any additional information below.
I feel I am making some sort of basic mistake, but there is nothing out there
really when googling this, so any help is appreciated.
thank you.
Original issue reported on code.google.com by [email protected]
on 17 Mar 2011 at 4:48
The client and invoice libraries were missing variables.
Client.php was missing:
- language
- currency code
- vat name
- vat number
BaseInvoice.php was missing:
- language
- currency code
I've added them in the attached files.
Original issue reported on code.google.com by [email protected]
on 27 Nov 2011 at 8:18
Attachments:
Hello,
Since some days I am getting following error:
Fatal error: Call to a member function children() on a non-object in
..../library/FreshBooks/Client.php on line 241
I am using PHP 5.3.6 with CURL enabled on Linux server.
As it is already live, looking for reply ASAP.
Thanks,
Kuldip
Original issue reported on code.google.com by [email protected]
on 6 Jul 2011 at 8:56
In the HttpClient.php class, certificate verification is explicitly disabled:
curl_setopt($this->_curlConn, CURLOPT_SSL_VERIFYPEER, FALSE); // Validate SSL
certificate
curl_setopt($this->_curlConn, CURLOPT_SSL_VERIFYHOST, FALSE);
Which means that you could be talking to an intermediary with a dodgy
certificate, instead of talking to FreshBooks. The proper verification, an
attacker would have to compromise a CA that you trust, which is considerably
harder.
I've attached a trivial patch, to simply remove those two lines. Modern
versions of the curl library set both of these to the reasonably secure mode by
default (7.10 onwards).
Original issue reported on code.google.com by [email protected]
on 23 Apr 2012 at 3:49
Attachments:
1. Call invoice->create
2. Pass "language"=>"fr" as a parameter
Invoice is expected to be created in french but it keeps being created in
english
I think it should be added ton BaseInvoice.php as it is used in Recurring too.
Original issue reported on code.google.com by [email protected]
on 10 Jan 2012 at 1:25
In FreshBooks_Element, the _getTagXML() method does not generate tags for
elements that have an empty string for a value. This makes it exceedingly
difficult for an application that is using FreshBooks PHP to clear a
previously-populated property of a FreshBooks object.
For example, consider a FreshBooks Client that has an secondary address. If
an application wants to clear it out on the FreshBooks site, the FreshBooks
API docs on developers.freshbooks.com indicate that the application needs
to send the client.update request and specify "s_street1", "s_street2", etc
tags without any values inside. But, if the application is using FreshBooks
PHP, setting $client->sStreet1 and $client->sStreet2 to empty strings will
cause them not to be transmitted.
I recommend switching this behavior over to using NULL as the indicator of
whether a field should be skipped, and using the PHP strict equals operator
(===) in the comparison.
Original issue reported on code.google.com by [email protected]
on 27 Apr 2010 at 4:33
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.