-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# silverstripe-xero | ||
|
||
## Maintainer Contact | ||
|
||
* Will Rossiter <[email protected]> | ||
|
||
## Installation | ||
|
||
> composer require "fullscreeninteractive/silverstripe-xero" | ||
## Documentation | ||
|
||
Provides a lightweight wrapper around `calcinai/xero-php` with additional | ||
Silverstripe support for authenication and connecting applications via oauth. | ||
|
||
To setup register a Xero Application and define your clientId and clientSecret | ||
as environment variables. | ||
|
||
``` | ||
XERO_CLIENT_ID='123' | ||
XERO_CLIENT_SECRET='123' | ||
``` | ||
|
||
Once those API keys are available, a new tab under the `Settings` admin will | ||
appear for connecting to Xero. Follow the prompts to link the selected account | ||
to your Silverstripe website. | ||
|
||
## Interacting with the API | ||
|
||
``` | ||
/** @var \XeroPHP\Application **/ | ||
$app = XeroFactory::singleton()->getApplication(); | ||
``` | ||
|
||
Integrating with the API is done via https://github.com/calcinai/xero-php. | ||
Consult that page for further information for creating invoices etc. | ||
|