<dependency>
<groupId>com.broadleafcommerce.microservices</groupId>
<artifactId>broadleaf-avalara-tax</artifactId>
</dependency>
Include the Broadleaf Avalara dependency in your CartOperationServices component:
<dependency>
<groupId>com.broadleafcommerce.microservices</groupId>
<artifactId>broadleaf-avalara-tax</artifactId>
</dependency>
broadleaf.tax.provider.avatax.environment
The AvaTax environment. Accepted values are "Sandbox" or "Production". Defaults to "Sandbox". Ignores case.
broadleaf.tax.provider.avatax.username
The AvaTax username.
broadelaf.tax.provider.avatax.password
The AvaTax password.
broadleaf.tax.provider.avatax.appName
The application name passed to AvaTax. Defaults to "Broadleaf Commerce"
broadleaf.tax.provider.avatax.appVersion
The application version. Defaults to "app-version-not-set"
broadleaf.tax.provider.avatax.machineName
The machine name. Defaults to "machine-name-not-set"
@Configuration
@EnableConfigurationProperties(AvaTaxProperties.class)
public static class AvalaraTaxAutoConfiguration {
@Bean
public TaxProvider<TaxRequest, TaxResponse> avaTaxProvider(AvaTaxProperties avaTaxProperties,
TypeFactory typeFactory,
ObjectMapper objectMapper) {
return new AvalaraTaxProvider<>(avaTaxProperties, typeFactory, objectMapper);
}
}
Tax commits, adjustments, voids, and refunds are disabled by default. To enable these interactions, see the order operations docs on post-checkout tax operations.
To enable the ability to commit, adjust, refund, and void transaction via Avalara, you must ensure that the AvalaraTaxProvider bean mentioned above is also accessible within the OrderOperationService. Depending on the organization of your flex packages, this may already be accomplished, or you may need to register the same dependency & configuration in an additional context to make it accessible to the OrderOperationService
Updated AvalaraTaxProvider
to correctly declare TaxInfo#isVat
& TaxDetail#isVat
based on whether taxes are included in the item prices. Note: These fields are misnomers & this change causes the values to align with the intention of the fields.
Updated AvaTaxProperties#environment
to use a default value of "Sandbox".