--------------------------------------------------------------

TaxJar - Realtime Tax Rates

--------------------------------------------------------------
Create date: 21 May 2019
Last Modified : 16 December 2019
***********************************************************************************
Contents:

A. SUMMARY
B. FILE STRUCTURE
C. INSTALLATION INSTRUCTION
D. HOW IT WORKS
E. FILE NEED TO BE MODIFIED
F. CONFIGURATION SETTINGS CHANGED
G. DATABASE TABLES MODIFIED
H. LANGUAGE SETTINGS CHANGED
I. CHANGE LOGS
J. TROUBLESHOOTING
K. COPYRIGHT NOTICE
L. TERMS AND CONDITIONS
***********************************************************************************

A. SUMMARY
==========
Allow merchants to retrieve Tax rate from TaxJar during checkout.
For more details about TaxJar, please visit https://www.taxjar.com

***********************************************************************************

B. FILE STRUCTURE
===================

Files included in the zip are:
- $READ_ME_FIRST_taxjar900.html
- shop_taxjar_subs.asp
- json/aspJSON1.17.taxjar.asp
- admin/taxjar_setup.asp
- admin/taxjar_setup_config.asp
- admin/taxjar_setup_process.asp
- admin/sqlscripts/taxjar/*


***********************************************************************************

C. INSTALLATION INSTRUCTION
============================
1a. Upload the below files to VPCart root folder.
- shop_taxjar_subs.asp
- json/aspJSON1.17.taxjar.asp

1b. Upload the below files to your ADMIN folder. If you have renamed your ADMIN folder, then this must be placed in the       renamed folder.
- admin/taxjar_setup.asp
- admin/taxjar_setup_config.asp
- admin/taxjar_setup_process.asp
- admin/sqlscripts/taxjar/*

2. If your V9 version is 9.0.0.1.2019.04.30.01 and earliest, please do the following (point 2):
2a. Download the files below from your server via FTP and follow the instructions below to modify the files.
- shopmodules_include.asp
- shoptax.asp

2a.1 Open the file shopmodules_include.asp with your favorite editor and
2a.1a. Locate below line:

<!-- #include file="shop_taxjar_subs.asp"-->

2.1b.If you unable to find above line, please insert below line to last line:

<!-- #include file="shop_taxjar_subs.asp"-->

2a.1c. Save the file


2a.2 Open the file shoptax.asp with your favorite editor and
2a.2a. Locate below lines, estimate line 25, within routine sub CalculateTax (subtotal, total, shippingcost, tax, pst)

' the tax price can include shipping or discounts

2a.2b. Above these codes, please insert :

'2019.05.20 - TaxJar
dim taxjar_rc, taxjar_error
Calculate_taxjar taxjar_rc, taxjar_error, subtotal, shippingcost, tax, pst
if taxjar_rc = 4 then
if trim(taxjar_error) <> "" then
if not check_onepage_status then
shoperror taxjar_error
end if
end if
exit sub
end if

2a.2c. Save the file

2a.3. Upload all amended files above to your server.

3. Log into Super Admin.

4. Execute setup file, eg: http://www.yourdomain.com/yourshoppingcartfolder/youradminfolder/taxjar_setup.asp.

5. After setup the module, would be redirected to Module configuration page to configure the module:
              
               Enable? - Set to Yes to enable TaxJar or No to disable.

               API Key - API Key provided by TaxJar

               Test mode? - Set to No if go for live

               Business name - Your store business name

               Business street - Business Address: Street

               Business city - Business Address: City

               Business state (2 Letters) - Business address: State. Eg: CA for California.

               Business zipcode - Business address: Zipcode

               Business country (2 Letters) - Business address: Country. Eg: US for United State.

7. If you have other Nexus addresses different from your Business address setup on the module, you must create Nexus profile from TaxJar Panel (under Account > State nexus settings)

***********************************************************************************

D. HOW IT WORKS
===============
1. The tax/pst (retrieved from TaxJar) will be returned at payment page.

NOTE:

If you have set up discount in your VPCart site, this module only will support discount by percentage.

There are two types of discount by percentage that this module supports:

1) Discount by Percentage that you set in xdiscountamount config.

In the case that if you have Discount by Percentage setup in your existing VPCart site config xdiscountamount, VPCart will read through the list of values in xdiscountamount, and if it is a percentage discount amount eg 0.1, then VPCart will deduct each cart items unit price by the percentage discount amount and then only send to TaxJar.

VPCart TaxJar module will not support Discount by fixed amount. If in the list of discount value for xdiscountamount, you set with a fixed discount amount eg 10, then VPCart will not include the discount to each cart items before passing to TaxJar.
This is due to the fact that TaxJar only read per item price basis, and not the total order amount, and we can only handle by discount percentage deduction to each cart item unit price.

2) Coupon by Percentage that you set in couponpercent field.

In the case that if you have existing coupon setup with having discount set in field couponpercent then if a customer uses the coupon during checkout, VPCart will read the couponpercent field value and deduct each cart items unit price by the couponpercent discount and then only send to TaxJar.

If you have set up Coupon with having discount by fixed amount in field couponamount then VPCart will not support this.

***********************************************************************************

E. FILE NEED TO BE MODIFIED
=================
- shopmodules_include.asp
- shoptax.asp

***********************************************************************************

F. CONFIGURATION SETTINGS CHANGED
New configs :
xtaxjar_enable
xtaxjar_apitoken
xtaxjar_testmode
xtaxjar_nexus_address_id
xtaxjar_nexus_address_street
xtaxjar_nexus_address_city
xtaxjar_nexus_address_state
xtaxjar_nexus_address_zip
xtaxjar_nexus_address_country
xtaxjar_gateway_sandbox
xtaxjar_gateway_production

***********************************************************************************

G. DATABASE TABLES MODIFIED
===========================
NONE

***********************************************************************************

H. LANGUAGE SETTINGS CHANGED
============================
NONE

***********************************************************************************

I. CHANGE LOGS
============================
'2019.12.16 - TaxJar: should let TaxJar handle Nexus but not from code

***********************************************************************************

J. TROUBLESHOOTING
============================
If you found no transactions are showing up in TaxJar, you maybe have incorrect configuration in your VPCart administration that causing it.
To fix such case, please check if your config xdefaultcountry is blank or not. If it is blank, you should fill in with value.
If config xdefaultcountry value is blank, the system will not send customers order details properly to TaxJar.

K. COPYRIGHT NOTICE
============================

Copyright (c) 1999-2019 Rocksalt International Pty. Ltd.
All rights reserved.

This software and documentation constitute a published work and
contains valuable trade secrets and proprietary information
belonging to Rocksalt International Pty. Ltd. .
None of the foregoing material may be copied,
duplicated or disclosed without the express written permission
of Rocksalt International Pty. Ltd. .

LICENSEE ACCEPTS VP-ASP Shopping Cart "AS IS" "WITH ALL FAULTS",
Rocksalt International Pty. Ltd. accepts no responsibility for the
operation or performance of the VP-ASP Shopping Cart.
The entire risk of use and consequences of use of the
VP-ASP Shopping Cart falls completely on the Licensee
and Rocksalt International Pty. Ltd. shall not be liable in any respect
for any claims, loss or injury alleged to have resulted
from use of or in reliance on VP-ASP Shopping Cart.

Licensee acknowledges that it has read the foregoing
disclaimers of warranty and limitation of liability
and understands that Licensee assumes
the entire risk of using VP-ASP Shopping Cart.


***********************************************************************************

L. TERMS AND CONDITIONS
============================
ROCKSALT INTERNATIONAL GRANTS TO THE LICENSEE A NON-EXCLUSIVE,
NON-SUB LICENSABLE, NONTRANSFERABLE LICENSE
TO INSTALL AND USE THIS APPLICATION ON A SINGLE DOMAIN FOR
A SINGLE SHOP.

THE CODE IN THE APPLICATION MAY BE MODIFIED FOR USE IN
SETTING UP A SINGLE SHOPPING SITE ON THE WORLD WIDE WEB.

LICENSEE MAY MAKE A COPY OF THE APPLICATION FOR
BACK-UP AND ARCHIVAL PURPOSES, PROVIDED THAT ANY COPY
MUST CONTAIN ALL PROPRIETARY NOTICES INCLUDED
WITH THE APPLICATION.

LICENSEE IS PROHIBITED FROM SELLING OR DISTRIBUTING
THE APPLICATION IN ANY MANNER.

LIMITATION OF LIABILITY.

ROCKSALT INTERNATIONAL AND ITS LICENSORS SHALL
NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE OR ANY
THIRD PARTY AS A RESULT OF USING OR DISTRIBUTING THIS
APPLICATION.

IN NO EVENT WILL ROCKSALT INTERNATIONAL OR ITS LICENSORS
BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA,
OR FOR DIRECT, INDIRECT, SPECIAL,
CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES,
HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LI
ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE,
EVEN IF ROCKSALT INTERNATIONAL HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.