Spree Taxjar is a US sales tax extension for Spree using the Taxjar service
Last updated on: June 22 at 06:02 AM
source code bug trackerSpree::Taxjar is a sales tax extension for Spree using SmartCalcs by TaxJar.
Account >> SmartCalcs API
to generate an API token
Account >> State Settings
and click the Add State with Nexus button for each state where want/need to collect sales tax.
Try Spree Taxjar for Spree Master with direct deployment on Heroku:
Try Spree Taxjar for Spree 3-4 with direct deployment on Heroku:
Try Spree Taxjar for Spree 3-1 with direct deployment on Heroku:
NOTE*: Don't forget to create a taxjar account and update the key in your admin section && Update tax rates to Spree/Taxjar calculator.
gem 'spree_taxjar', github: 'vinsol-spree-contrib/spree_taxjar'
Note For spree 3-1 use 3-1-stable
branch. For spree version > 3-1 use master
branch.
bundle install
bundle exec rails g spree_taxjar:install
If your server was running, restart it so that it can find the assets properly.
TAXJAR ENABLED
checkboxTAXJAR DEBUG ENABLED
for debugging issuesSpree::Config[:taxjar_enabled]
is set as expected (true/false)Spree::Config[:taxjar_debug_enabled]
as true
spec/dummy/log/spree_taxjar.log
if using testslog/spree_taxjar.log
where you have installed the spree_taxjar extensionlog/development.log
(works for all environments)spec/fixtures/vcr_cassettes
Spree::Config[:taxjar_api_key]
as your api_key and inspect resultsTaxJar provides 2 set of API tiers (Standard and Advanced) but shipping in both cases is sent as single unit which makes Sales Tax calculation for different shipments a bit tricky or hacky.
First bundle your dependencies, then run rake
. rake
will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using rake test_app
.
bundle
bundle exec rake
Copyright (c) 2016 vinsol.com, released under the New MIT License
For better handling of exceptions raised by TaxJar due to various validations add the following code to your project's application_controller.rb
:
rescue_from Taxjar::Error, with: :taxjar_rollback
private
def taxjar_rollback(e)
flash[:error] = 'TaxJar::' + e.message
redirect_to cart_path
end