com.softslate.commerce.businessobjects.payment
Class AuthorizeNetProcessor
java.lang.Object
com.softslate.commerce.businessobjects.core.BaseBusinessObject
com.softslate.commerce.businessobjects.core.BaseBusinessProcessor
com.softslate.commerce.businessobjects.payment.BasePaymentProcessor
com.softslate.commerce.businessobjects.payment.AuthorizeNetProcessor
- All Implemented Interfaces:
- BusinessObject, BusinessProcessor, PaymentProcessor
public class AuthorizeNetProcessor
- extends BasePaymentProcessor
- implements PaymentProcessor
Processes a payment in the store for a given user's cart. This implementation
processes a request through Authorize.net's AIM integration method.
If the transaction is declined a result code of 10000 is returned, if it is
successful a result code of 0 is returned, and otherwise the result code sent
back from Authorize.net is returned.
- Author:
- Justin Casp, David Tobey
- See Also:
PaymentDAO
Methods inherited from class com.softslate.commerce.businessobjects.core.BaseBusinessProcessor |
formatDateTime, formatPrice, getAppComponents, getAppSettings, getAttributeIDs, getBusinessObjectFactory, getDaoFactory, getProductIDs, getSettings, getUser, initialize, loadMatchingSkus, parseDateTime, parseResponseData, prepareRequestData, sendHTTPPost, setAppComponents, setAppSettings, setBusinessObjectFactory, setDaoFactory, setSettings, setUser, updateOrderTotals, updateOrderTotals, utils |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.softslate.commerce.businessobjects.core.BusinessProcessor |
getAppComponents, getAppSettings, getBusinessObjectFactory, getDaoFactory, getSettings, getUser, setAppComponents, setAppSettings, setBusinessObjectFactory, setDaoFactory, setSettings, setUser, utils |
log
static org.apache.commons.logging.Log log
RESPONSE_APPROVED
public static final int RESPONSE_APPROVED
- See Also:
- Constant Field Values
RESPONSE_DECLINED
public static final int RESPONSE_DECLINED
- See Also:
- Constant Field Values
RESPONSE_ERROR
public static final int RESPONSE_ERROR
- See Also:
- Constant Field Values
RESPONSE_CODE
public static final int RESPONSE_CODE
- See Also:
- Constant Field Values
RESPONSE_REASON_CODE
public static final int RESPONSE_REASON_CODE
- See Also:
- Constant Field Values
RESPONSE_REASON_TEXT
public static final int RESPONSE_REASON_TEXT
- See Also:
- Constant Field Values
RESPONSE_AUTH_CODE
public static final int RESPONSE_AUTH_CODE
- See Also:
- Constant Field Values
RESPONSE_AVS_CODE
public static final int RESPONSE_AVS_CODE
- See Also:
- Constant Field Values
RESPONSE_TRANSACTION_ID
public static final int RESPONSE_TRANSACTION_ID
- See Also:
- Constant Field Values
RESPONSE_CVV2_CODE
public static final int RESPONSE_CVV2_CODE
- See Also:
- Constant Field Values
RESPONSE_TRANSACTION_TYPE
public static final int RESPONSE_TRANSACTION_TYPE
- See Also:
- Constant Field Values
RESPONSE_AMOUNT
public static final int RESPONSE_AMOUNT
- See Also:
- Constant Field Values
gatewayPostParams
protected java.util.Map gatewayPostParams
AuthorizeNetProcessor
public AuthorizeNetProcessor()
initializePostParams
public java.util.Map initializePostParams(java.util.Map parameters)
throws java.lang.Exception
- Throws:
java.lang.Exception
process
public java.util.Map process(java.util.Map parameters)
throws java.lang.Exception
- Description copied from class:
BasePaymentProcessor
- Subclasses must override this method to execute processing. Called by
BasePaymentProcessor.processPayment(Map)
.
- Specified by:
process
in class BasePaymentProcessor
- Parameters:
parameters
- A Map
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, the Map
may include
additional keys, such as "resultMessage", a string describing the
results of the processing.
- Throws:
java.lang.Exception
processAuthOnly
public java.util.Map processAuthOnly(java.util.Map parameters)
throws java.lang.Exception
- Throws:
java.lang.Exception
processAuthCapture
public java.util.Map processAuthCapture(java.util.Map parameters)
throws java.lang.Exception
- Throws:
java.lang.Exception
processPriorAuthCapture
public java.util.Map processPriorAuthCapture(java.util.Map parameters)
throws java.lang.Exception
- Throws:
java.lang.Exception
processVoid
public java.util.Map processVoid(java.util.Map parameters)
throws java.lang.Exception
- Throws:
java.lang.Exception
processTransaction
protected java.util.Map processTransaction(java.util.Map parameters)
throws java.lang.Exception
- Throws:
java.lang.Exception
processResponse
protected java.util.Map processResponse(java.lang.String responseData,
java.util.Map parameters)
throws java.lang.Exception
- Throws:
java.lang.Exception
processSuccessResponse
protected java.util.Map processSuccessResponse(java.util.Map parameters,
java.util.List response)
throws java.lang.Exception
- Throws:
java.lang.Exception
processDeclinedResponse
protected java.util.Map processDeclinedResponse(java.util.Map parameters,
java.util.List response)
throws java.lang.Exception
- Throws:
java.lang.Exception
processErrorResponse
protected java.util.Map processErrorResponse(java.util.Map parameters,
java.util.List response)
throws java.lang.Exception
- Throws:
java.lang.Exception
processErrorResponse
protected java.util.Map processErrorResponse(java.util.Map parameters,
java.lang.String response)
throws java.lang.Exception
- Throws:
java.lang.Exception
printResponseArray
protected void printResponseArray(java.util.List l)
Copyright © SoftSlate, LLC 20032005