Invoice Sync for Xero and WPeCommerce WordPress Plugin

Invoice Sync for Xero and WPeCommerce(isxwpe) is a wordpress plugin, which create invoice on xero for purchases on wordpress using WPeCommerce plugin. Actually it’s an extension for WPeCommerse plugin. The plugin only works for xero private application and we need private key, application token and developer token for authentication. The plugin can be divided into 4 sections.

 

  • Xero authentication
  • Create invoice
  • List invoice
  • Help page

 


 

 

Xero Authentication

 

To add an invoice, we need to authenticate xero account. The xero application must be a private application. After plugin installation, it will create application options menu on left side menu of wp-admin. The options will be listed under Xero Sync main menu. Click Xero sync on sub-menu, it will redirect to auth page. Add customer key and customer secret on Xero authentication form; upload private key and click authenticate button. If there is any auth error the plugin will list the error, or saves api keys and uploads private key.

 

Create Invoices

 

The plugin will add invoices to xero automatically after installation. And the plugin will be triggered at last step of WP-eCommerce checkout. After the checkout-forms are filled in and clicked checkout, the plugin will collect customer details, product details, transaction amount, etc., then the plugin will call xero api and create an invoice request and post it. After adding invoice, xero will return invoice number and our plugin will save invoice number, transaction id etc. into database

 

List invoice

 

Xero sync history option under Xero auth menu will list all the invoice added by plugin. When history page loads it will list transactions of last 30 days. We can select date range using date filter on history page. On filter we can select a start date and end date from calendar shown. The plugin will list all the invoices on the selected range. The plugin will list only 25 records on a single page. Pagination is added to display more records

 

Help page

 

The plugin also include a help page, which will describe how to configure application and steps to create a private application on xero.