Avatax integration with Solidus
Avatax integration with Solidus.
WARNING: Currently, Solidus Team is not supporting this extension. If you need to implement Avalara AvaTax functionality into your store, please have a look at solidus_avatax_certified by Boomer Digital.
In your Gemfile:
gem "solidus_avatax"
Then run from the command line:
bundle install
rails g solidus_avatax:install
In case of service problems or outages on Avatax’s end, you can disable Avatax
or change the API timeout. These values are stored in the database so that they
can be applied instantly and without restarting your application. To change the
values create a new SpreeAvatax::Config. The default values are:
SpreeAvatax::Config.create!(enabled: true, timeout: SpreeAvatax::Config::DEFAULT_TIMEOUT)
This is an append-only table and solidus_avatax will read these config values
from the last record (by id).
If you want to notify Avatax about short ships you should configure the
following:
Spree::OrderCancellations.short_ship_tax_notifier = ->(unit_cancels) do
SpreeAvatax::ShortShipReturnInvoice.generate(unit_cancels: unit_cancels)
end
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
Live tests are provided to insure that the Avalara gem works as promised. The
credentials must be provided under spec/avalara_config.yml
to run them
successfully. See the example YAML for guidance.
username: 'USERNAME'
password: 'PASSWORD'
company_code: 'COMPANY'
These tests will communicate against the test Avatax API.