Spree::Taxjar is a sales tax extension for Spree using SmartCalcs by TaxJar.
Account >> SmartCalcs APIto generate an API token
Account >> State Settingsand 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
bundle exec rails g spree_taxjar:install
If your server was running, restart it so that it can find the assets properly.
TAXJAR DEBUG ENABLEDfor debugging issues
Spree::Config[:taxjar_enabled]is set as expected (true/false)
spec/dummy/log/spree_taxjar.logif using tests
log/spree_taxjar.logwhere you have installed the spree_taxjar extension
log/development.log(works for all environments)
Spree::Config[:taxjar_api_key]as your api_key and inspect results
TaxJar 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 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
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
rescue_from Taxjar::Error, with: :taxjar_rollback private def taxjar_rollback(e) flash[:error] = 'TaxJar::' + e.message redirect_to cart_path end