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
Magento 2.1 or Magento 2.2
AvaTax extension installed and configured for tax calculation
Steps to reproduce
As a guest, add a product to the cart
Navigate to the cart page
Select 'United States' for the country
Select no state
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
No request will be sent to Avalara since no zip code was provided
Actual result
A tax request is sent to Avalara with a zip code value of '*' and an error is received in response
Proposed solution
To reduce the number of bad requests, consider requiring a zip code length of >= 3 characters
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
Steps to reproduce
Expected result
Actual result
Proposed solution