Avatax integration with Solidus.
In your Gemfile:
Then run from the command line:
bundle install rails g solidus_avatax:install
Disabling Avatax and Avatax API Timeouts
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:
::.create!(enabled: true, 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 ::.(unit_cancels: unit_cancels) end
- "Additional tax" (e.g. US taxes) is supported but "included tax" (e.g. VAT) is not. This feature is not on the roadmap but we'd be willing to look at pull requests for it.
- Note for future development: There is currently a bug in Solidus where the "open all adjustments" admin button doesn't work for line item adjustments. See here. If that bug were ever fixed, we'd want to monkey patch the controller action to prevent tax adjustments from ever being re-opened. We always want tax adjustments to be "closed", which tells Solidus not to try to recalculate them automatically.
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
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.