com.softslate.commerce.businessobjects.payment
Class AuthorizeNetProcessor

java.lang.Object
  extended by com.softslate.commerce.businessobjects.core.BaseBusinessObject
      extended by com.softslate.commerce.businessobjects.core.BaseBusinessProcessor
          extended by com.softslate.commerce.businessobjects.payment.BasePaymentProcessor
              extended by 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

Field Summary
protected  java.util.Map gatewayPostParams
           
(package private) static org.apache.commons.logging.Log log
           
static int RESPONSE_AMOUNT
           
static int RESPONSE_APPROVED
           
static int RESPONSE_AUTH_CODE
           
static int RESPONSE_AVS_CODE
           
static int RESPONSE_CODE
           
static int RESPONSE_CVV2_CODE
           
static int RESPONSE_DECLINED
           
static int RESPONSE_ERROR
           
static int RESPONSE_REASON_CODE
           
static int RESPONSE_REASON_TEXT
           
static int RESPONSE_TRANSACTION_ID
           
static int RESPONSE_TRANSACTION_TYPE
           
 
Constructor Summary
AuthorizeNetProcessor()
           
 
Method Summary
 java.util.Map initializePostParams(java.util.Map parameters)
           
protected  void printResponseArray(java.util.List l)
           
 java.util.Map process(java.util.Map parameters)
          Subclasses must override this method to execute processing.
 java.util.Map processAuthCapture(java.util.Map parameters)
           
 java.util.Map processAuthOnly(java.util.Map parameters)
           
protected  java.util.Map processDeclinedResponse(java.util.Map parameters, java.util.List response)
           
protected  java.util.Map processErrorResponse(java.util.Map parameters, java.util.List response)
           
protected  java.util.Map processErrorResponse(java.util.Map parameters, java.lang.String response)
           
 java.util.Map processPriorAuthCapture(java.util.Map parameters)
           
protected  java.util.Map processResponse(java.lang.String responseData, java.util.Map parameters)
           
protected  java.util.Map processSuccessResponse(java.util.Map parameters, java.util.List response)
           
protected  java.util.Map processTransaction(java.util.Map parameters)
           
 java.util.Map processVoid(java.util.Map parameters)
           
 
Methods inherited from class com.softslate.commerce.businessobjects.payment.BasePaymentProcessor
findPaymentWithLiveInfo, processPayment
 
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.payment.PaymentProcessor
processPayment
 
Methods inherited from interface com.softslate.commerce.businessobjects.core.BusinessProcessor
getAppComponents, getAppSettings, getBusinessObjectFactory, getDaoFactory, getSettings, getUser, setAppComponents, setAppSettings, setBusinessObjectFactory, setDaoFactory, setSettings, setUser, utils
 
Methods inherited from interface com.softslate.commerce.businessobjects.core.BusinessObject
initialize
 

Field Detail

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
Constructor Detail

AuthorizeNetProcessor

public AuthorizeNetProcessor()
Method Detail

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 2003–2005