Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for fallback rates #198

Open
bporcelli opened this issue Sep 1, 2023 · 0 comments
Open

Add support for fallback rates #198

bporcelli opened this issue Sep 1, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@bporcelli
Copy link
Owner

bporcelli commented Sep 1, 2023

Users would like to be able to specify per-state fallback tax rates to apply when there are issues with connectivity to the TaxCloud API during checkout.

Requirements

  • Add a "Enable Fallback Rates" checkbox on the Simple Sales Tax Settings page
  • When "Enable Fallback Rates" is checked, reveal a table where the user can enter an optional fallback rate for each US state
    • The fallback rate value for each state will either be a number like 10 for 10%, or blank to denote a zero rate
  • If a network error is encountered while making the Lookup request during checkout, check whether the user has entered a fallback rate for the state the user's shipping address is in. If a nonzero fallback rate is found, calculate tax using the fallback rate, else apply a zero rate. If a fallback rate is applied, save it to the order for future reference.
  • If an order was not synchronized to TaxCloud due to fallback rate being applied:
    • Display a warning icon next to the order on the WooCommerce Orders list screen, with a clear message that indicates the order needs to be synchronized to TaxCloud that appears on hover.
    • Add a button in the Simple Sales Tax box on the Edit Order screen that allows the user to synchronize the order to TaxCloud. When this button is clicked, perform any API calls required to sync the order to TaxCoud (e.g. LookupForDate and AuthorizedWithCapture or AddTransactions). If an error occurs, display an alert box. On success, hide the sync button.
      • TBD: Do we need to include as special comment in the AuthorizedWithCapture request body to signify the fallback rate that was applied? Would it be better to use AddTransactions to sync orders where a fallback was applied, specifying the actual tax amounts collected in the request body?
      • IMPORTANT: Using the "Sync" button SHOULD NOT change the tax amount applied on the WooCommerce order, i.e. the Sales Tax line for the order should still reflect the fallback tax amount charged to the customer during checkout.

Screenshot 2023-09-01 at 12-00-55 Edit order #90814 ‹ Simple Sales Tax — WordPress

@bporcelli bporcelli added the enhancement New feature or request label Sep 1, 2023
@bporcelli bporcelli added this to the 7.2.0 milestone Sep 1, 2023
@bporcelli bporcelli self-assigned this Sep 1, 2023
@bporcelli bporcelli modified the milestones: 8.1.0, 8.2.0 Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant