Step 1: Create a public private key pair using SSL:


 Using Xero Add-on (Auto generate keys)

  1. Install Xero on CS Cart.
  2. Go to Xero Settings and click on Generate Public/Private SSL Keys. (This works on most Linux/Unix Servers)
  3. It will then provide you with the SSL Key that you need to add once you create an Application on Xero. (See Step 2)


 Using OpenSSL (Manually generate keys)


 To execute the commands in SSH, Please contact the server admin and execute the following command to create public/private key-pair.

 

 Please refer the following the link below:

 URL: http://developer.xero.com/documentation/advanced-docs/public-private-keypair/


 The basics command line steps to generate a private and public key using OpenSSL are as follow:


  openssl genrsa -out privatekey.pem 1024

  openssl req -new -x509 -key privatekey.pem -out publickey.cer -days 365

  openssl pkcs12 -export -out public_privatekey.pfx -inkey privatekey.pem -in publickey.cer


 Use the host name (Very important) (While generating the key pair it will ask for host name in that please provide this name as host name).


Using CPanel (Manually generate keys)

  1. Go to SSL/TLS Manager
  2. Under Certificates (CRT), click on generate certificate.
  3. Fill up the form and click Generate.


 Upload the generated public and private key certificate under "certs" folder in xero add-on "app/addons/xero/certs" if you generated the keys manually.


Step 2:  Create application in Xero:


 1. Go to : https://api.xero.com/Application/List

 2. Click the button "Add Application".

 3. What type of application are you developing? - Select "Private"

 4. Type the Application Name

 5. Please select which organisation your application can access:- Select the organisation you created in your Xero account.

 6. Paste/Upload the Public Key that you generated on Step 1.

 7. Copy the Consumer Key and Consumer Secret. (See Step 3)


Step 3: Add-on Installation in CS-cart:


 1. Login to admin panel in cs-cart: Go to Addons -> Xero Accounting add-on click Install.

 2. Go to Settings and provide the corresponding information from Xero (Consumer Key and Consumer Secret that were generated when you created the application on Xero API on Step 2).


Step 4: Account Settings:


 Go to Add-ons -> Xero Settings -> Xero Account Settings

 1. Choose the Income accounts for invoice items.

 2. Choose the Income accounts for Payment Surcharges, Shipping cost, Promo codes, Gift Certificates.


Step 5: Tax Settings: 


 Go to Add-ons -> Xero Settings -> Xero Tax Settings

 1. Choose the tax types.


Step 6: Payment Settings: 


 Go to Add-ons -> Xero Settings -> Xero Payment Settings

 1. Choose the options for each active payment.


That's it!