Interface PaymentProcessor
- All Superinterfaces:
BusinessObject
,BusinessProcessor
- All Known Subinterfaces:
IPayPalDirectPaymentProcessor
,IPayPalExpressPaymentProcessor
- All Known Implementing Classes:
AuthorizeNetAIMProcessor
,AuthorizeNetAPIProcessor
,AuthorizeNetDPMProcessor
,BasePaymentProcessor
,BasePayPalNVPProcessor
,BasicPaymentProcessor
,CheckPaymentProcessor
,FirstDataProcessor
,PayflowLinkProcessor
,PayflowProACHProcessor
,PayflowProProcessor
,PayPalDirectProcessor
,PayPalExpressProcessor
,PayPalUKDirectProcessor
,PayPalUKExpressProcessor
,PaypointProcessor
,PurchaseOrderPaymentProcessor
Interface for objects that are able to process payments in the store. Custom
payment processors must simply implement
PaymentProcessor
.
(Although it may be useful also to extend
BasePaymentProcessor
.)
To change or add to the list of payment processors currently active in the
system, modify the "activePaymentProcessors" setting in the
appComponents.properties
file.
During checkout the Struts layer loops through each of the
"activePaymentFormTemplates" to display a set of payment forms for the user.
Based on the form that user chooses to submit, the Struts layer calls the
"activePaymentProcessor" that corresponds to it. It invokes the
processPayment(Map)
method to process the submission. The incoming
Map
contains the various input parameters submitted by the
user.
There is one default "activePaymentProcessor":
BasicPaymentProcessor
.
- Author:
- David Tobey
-
Method Summary
Modifier and TypeMethodDescriptionprocessPayment
(Map parameters) Process the payment for the current user's order.processPaymentCapture
(Order order) processVoid
(Map parameters) Methods inherited from interface com.softslate.commerce.businessobjects.core.BusinessObject
initialize
Methods inherited from interface com.softslate.commerce.businessobjects.core.BusinessProcessor
getAppComponents, getAppSettings, getBusinessObjectFactory, getDaoFactory, getEventBus, getInjector, getSettings, getUser, setAppComponents, setAppSettings, setBusinessObjectFactory, setDaoFactory, setEventBus, setInjector, setSettings, setUser, utils
-
Method Details
-
processPayment
Process the payment for the current user's order. The incomingMap
contains the various input parameters submitted by the user.- Parameters:
parameters
- AMap
containing the values of the user's submitted payment information.- Returns:
- A
Map
containing a least one key named "resultCode", which contains a String parsable into an int, representing the results of the processing. 0 for the resultCode indicates success. Optionally, theMap
may include additional keys, such as "resultMessage", a string describing the results of the processing. - Throws:
Exception
-
processPaymentCapture
- Throws:
Exception
-
processVoid
- Throws:
Exception
-