PHP code example of cakephp-biztech / cakephp-xero-oauth2
1. Go to this page and download the library: Download cakephp-biztech/cakephp-xero-oauth2 library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cakephp-biztech / cakephp-xero-oauth2 example snippets
Plugin::load('XeroOauth2', ['routes' => true]);
return [
'XeroOauth2' => [
'clientId' => 'your-client-id',
'clientSecret' => 'your-client-secret',
'baseUri' => 'https://example.com',
'scope' => [
'openid',
'email',
'profile',
'offline_access',
'accounting.settings',
'accounting.contacts',
// Any other scopes needed for your application goes here
],
'successUrl' => 'http://example.com/success'
]
];