PHP code example of invoiced / oauth1-xero

1. Go to this page and download the library: Download invoiced/oauth1-xero 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/ */

    

invoiced / oauth1-xero example snippets


$server = new Invoiced\OAuth1\Client\Server\Xero([
    'identifier'      => 'your-identifier',
    'secret'          => 'your-secret',
    'callback_uri'    => 'https://your-callback-uri/',
    'partner'         => false,
]);

$server = new Invoiced\OAuth1\Client\Server\Xero([
    'identifier'      => 'your-identifier',
    'secret'          => 'your-secret',
    'callback_uri'    => 'https://your-callback-uri/',
    'rsa_private_key' => '/path/private.pem',
    'rsa_public_key'  => '/path/public.pem',
]);

$server = new Invoiced\OAuth1\Client\Server\Xero([
    'identifier'      => 'your-identifier',
    'secret'          => 'your-secret',
    'callback_uri'    => 'https://your-callback-uri/',
    'rsa_private_key' => '/path/private.pem',
    'rsa_public_key'  => '/path/public.pem',
]);