classyllama / ClassyLlama_AvaTax

This extension has been deprecated in favor of https://github.com/avadev/Avalara-AvaTax-for-Magento2
Open Software License 3.0
23 stars 15 forks source link

Invalid/partial zip code values result in errors logged #122

Closed rsisco closed 6 years ago

rsisco commented 6 years ago

Magento's process for requesting tax estimates can result in partial zip codes being sent to Avalara in tax requests, specifically from the cart page. This also results in extra API requests.

Preconditions

  1. Magento 2.1 or Magento 2.2
  2. AvaTax extension installed and configured for tax calculation

Steps to reproduce

  1. As a guest, add a product to the cart
  2. Navigate to the cart page
  3. Select 'United States' for the country
  4. Select no state
  5. Enter a value of '*' for zip code (a similar scenario is to type a zip code very slowly, since a request is made after each character is typed - with a slight delay)

Expected result

  1. No request will be sent to Avalara since no zip code was provided

Actual result

  1. A tax request is sent to Avalara with a zip code value of '*' and an error is received in response img img

Proposed solution

  1. To reduce the number of bad requests, consider requiring a zip code length of >= 3 characters
rsisco commented 6 years ago

This issue has been addressed in release 1.4.4.