Interface ShippingProcessor
- All Superinterfaces:
BusinessObject
- All Known Implementing Classes:
BaseShippingProcessor
,BasicShippingProcessor
,FedExShippingProcessor
,UPSShippingProcessor
,USPSShippingProcessor
ShippingProcessor
.
To change or add to the list of shipping processors currently active in the
system, modify the "activeShippingProcessors" setting in the
appComponents.properties
file.
During checkout, the Struts layer invokes each of the
"activeShippingProcessors" by calling their
loadShippingOptions()
method to get a list of options related
to this ShippingProcessor
, and
processShipping(Map parameters)
to process the option that was
selected. The incoming Map
contains the
shippingOption
selected by the user, along with any other
request parameters.
The default "activeShippingProcessor" is
BasicShippingProcessor
.
- Author:
- David Tobey
-
Method Summary
Modifier and TypeMethodDescriptionloadShippingOptions
(Map parameters) Load the shipping options related to thisShippingProcessor
.processShipping
(Map parameters) Process the shipping charges for the current user's order.Methods inherited from interface com.softslate.commerce.businessobjects.core.BusinessObject
initialize
-
Method Details
-
loadShippingOptions
Load the shipping options related to thisShippingProcessor
.Shipping options might include, for example, ground, 2-day air, bulk, etc.
The
Collection
returned should be a collection ofMap
objects that must include the following keys:- code: A unique
String
code for the shipping option under this shipping processor. E.g., "GROUND". - name: The
String
name of the shipping option for diplay to users. E.g., "Ground". - price: The formatted price for the shipping option represented as a
String
and including currency formatting, for display to the user. - priceDouble: The raw price for the shipping option represented as a
Double
.
- Parameters:
parameters
- A Map containing information from the current request.- Returns:
- A
Collection
ofMap
objects that contain the code, name, and price for each shipping option related to thisShippingProcessor
. - Throws:
Exception
- code: A unique
-
processShipping
Process the shipping charges for the current user's order. The incomingMap
should contain a key namedshippingOption
that contains thecode
of the shipping option selected by the user. It may also contain additional input parameters related to how the shipping should be charged.- Parameters:
parameters
- A Map containing the shipping infofmation submitted by the user. It should contain a key namedshippingOption
that contains thecode
of the shipping option selected by the user.- 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
-