项目作者: solidusio

项目描述 :
Avatax integration with Solidus
高级语言: Ruby
项目地址: git://github.com/solidusio/solidus_avatax.git
创建时间: 2015-06-17T18:54:26Z
项目社区:https://github.com/solidusio/solidus_avatax

开源协议:BSD 3-Clause "New" or "Revised" License

下载


Solidus Avatax

Build Status

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.

Installation

In your Gemfile:

  1. gem "solidus_avatax"

Then run from the command line:

  1. bundle install
  2. rails g solidus_avatax:install

Configuration

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:

  1. 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).

Short Ships

If you want to notify Avatax about short ships you should configure the
following:

  1. Spree::OrderCancellations.short_ship_tax_notifier = ->(unit_cancels) do
  2. SpreeAvatax::ShortShipReturnInvoice.generate(unit_cancels: unit_cancels)
  3. end

Known Issues

  1. “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.
  2. 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.

Testing

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.

  1. bundle
  2. 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.

  1. username: 'USERNAME'
  2. password: 'PASSWORD'
  3. company_code: 'COMPANY'

These tests will communicate against the test Avatax API.