Git Product home page Git Product logo

php-xero's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

php-xero's Issues

publickey and privatekey

Hai,

I am web developer, my client wants to integrate xero with his application, he has given XERO_KEY and XERO_SECRET.
Where can I get the files publickey.cer and privatekey.pem? Is these files are unique for every user of XERO? or common for all users.

Thanks.

Xero.php not woking in php 5.2.11 version

Hi there

Can you help with the problem i am get to integrate php with xero.
i am download xero.php file,so i am getting response from xero for php 5.3.1 version
but not for php 5.2.11 version.

Is there any specific library that i need to look for in php.

Thanks in advances

T

Issue with Xero Payments

Hi,

When attempting to add a payment I get the following error:

PHP Warning: curl_exec(): CURLOPT_INFILE resource has gone away, resetting to default in xero.php on line 309

If I change the call to something other than payments this issue doesnt occur

Library no longer working with updated API

I'm getting this error message when try to retrieve contact with parameters ContactID:
<xmp>

0
Operator '==' incompatible with operand types 'Guid' and 'String'

</xmp>
and when retrieve contact by using other parameters ("Name" etc), no information is returned:
<xmp>

6c5fbf40-0af2-4326-97eb-b384693f1e3b
OK
SXI-SHOPP XERO Private Integrator
2010-08-14T09:13:05.7253215Z

</xmp>
It was working before and this suddenly happened!

Tracking Categories

I've had a crack, but can't work out how the library is handling tracking categories. Could you please add a tracking category to the example for posting an invoice? Thanks

It should throw an error if public_cert or private_key file paths are wrong.

it took me a bit of playing around before I realized that the error:

Fatal error: Call to a member function get_name() on a non-object in /xero.php on line 784

Was being caused due to an incorrect path being given... would be nice if it had thrown an error at line 188 rather than just returning false.

If Modified since issue

Hi

Your If Modified since header wasn't working - this is what works for me ie, set HEADER to True & Set HTTPHEADER to the value required:

        if ( $modified_after ) {
            curl_setopt($ch, CURLOPT_HTTPHEADER, array("If-Modified-Since: $modified_after"));
        }
        curl_setopt($ch, CURLINFO_HEADER, 1);

Items Method and Items in InvoiceLines

Hi,

Great work just a couple of niggles.

Seems that Items are supported in the class methods. You can add this quite simply by amending the valid methods arrays to include Items and it just works if you post the correct data.

In my experience with it you need the items in place within Xero to add an invoice line with an ItemCode.

Unsure how to check for error responses

What's the best way to check for an error response? If, for example, you make an API call that succeeds, but the request itself is an error, how should I check?

For example, if you try to create a new invoice when there is a pre-existing approved invoice, the entire API call itself "succeeds" but returns an error, which passes the is_object test that is at the bottom of the readme sample.

The return code looks like this:
SimpleXMLElement Object

(
    [ErrorNumber] => 10
    [Type] => ValidationException
    [Message] => A validation exception occurred
    [Elements] => SimpleXMLElement Object
        (
            [DataContractBase] => Array
                (
...

CodeIgniter Integration

I'm trying to integrate your library into my CodeIgniter project, and get the following message:

A PHP Error was encountered
Severity: Notice
Message: Trying to get property of non-object
Filename: libraries/xero.php
Line Number: 630

This is the code that is accessing the library:

include_once "xero.php"; define('XERO_KEY','BLABLA'); define('XERO_SECRET','BLABLA'); $xero = new Xero(XERO_KEY, XERO_SECRET, 'xero_keys/publickey.cer', 'xero_keys/privatekey.pem', 'xml'); return $xero->Contacts;

Keys replaced for security, any help would be greatly appreciated.

Problem with $xero->Payments

All methods seem to work fine except $xero->Payments

The screen just goes blank after calling the following method with print_r. I've PHP error values set to show all & it's still blank.

$payment_result = $xero->Payments( $new_payment );
print_r($payment_result);

Any ideas?

Adding more than one LineItem

Hi there,

I'm just playing around with the PHP-Xero class at the moment - very cool stuff!

The only issue I've run into is that I'm not sure how to add more than one line item to an invoice. Obviously, rewriting the LineItem array each time just replaces the last LineItem. Have you got any ideas on a work-around for this?

Would really appreciate any thoughts!

Cheers,

Jamie.

Download PDF Invoices

Hi All,

I recently noticed that xero have updated the API, to allow the automated download of approved invoices into PDF format.

I have contacted xero for an actual sample code of this new functionality, the response was poor to say the least.

Does anyone have an example of downloading a PDF invoice through the API?

Thanks very much!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.