Interface TaxProcessor
- All Superinterfaces:
BusinessObject
- All Known Implementing Classes:
AvaTaxProcessor
,BaseTaxProcessor
,BasicTaxProcessor
Interface for objects that are able to process tax charges in the store.
Custom tax processors must simply implement
TaxProcessor
.
To change or add to the list of tax processors currently active in the
system, modify the "activeTaxProcessors" setting in the
appComponents.properties
file.
During checkout, the Struts layer invokes each of the "activeTaxProcessors"
by calling their processTax(Map parameters)
method to process
tax on the current user's cart.
The default "activeTaxProcessor" is
BasicTaxProcessor
.
- Author:
- David Tobey
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isShippingTaxable
(Order order) Integrations need to know if shipping on an order is taxable or not.processTax
(Map parameters) Process the tax charges for the current user's order.Methods inherited from interface com.softslate.commerce.businessobjects.core.BusinessObject
initialize
-
Method Details
-
processTax
Process the tax charges for the current user's order. The incomingMap
should contain any input parameters from the user related to how the tax should be charged.- Parameters:
parameters
- AMap
containing any input parameters from the user related to how the tax should be charged.- Returns:
- A Map containing a least one key named "resultCode", which contains a String parsable into an integer, representing the results of the processing. 0 for the resultCode indicates success, anything else indicates an error and that processing should stop.
- Throws:
Exception
-
isShippingTaxable
Integrations need to know if shipping on an order is taxable or not. This opens up BaseTaxProcessor.isStateWhereShippingIsTaxable so outside processes can use it, and individual tax processors can override it if necessary.- Parameters:
order
-- Returns:
-