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
See Also:
PaymentDAO

Field Summary
protected  java.util.Map gatewayPostParams
           
(package private) static org.apache.commons.logging.Log log
           
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
           
 
Constructor Summary
AuthorizeNetProcessor()
           
 
Method Summary
protected  void printResponseArray(java.util.List l)
           
 java.util.Map process(java.util.Map parameters)
          Subclasses must override this method to execute processing.
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)
           
protected  java.util.Map processSuccessResponse(java.util.Map parameters, java.util.List response)
           
 
Methods inherited from class com.softslate.commerce.businessobjects.payment.BasePaymentProcessor
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, 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.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

gatewayPostParams

protected java.util.Map gatewayPostParams
Constructor Detail

AuthorizeNetProcessor

public AuthorizeNetProcessor()
Method Detail

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

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