Class AuthorizeNetAPIProcessor
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.AuthorizeNetAPIProcessor
- All Implemented Interfaces:
BusinessObject
,BusinessProcessor
,PaymentProcessor
- Direct Known Subclasses:
AuthorizeNetAIMProcessor
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:
- David Tobey
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected net.authorize.api.contract.v1.CustomerAddressType
configureBillingAddress
(Map parameters) private String
configureCustomerIdInSessionAndTransactionRequest
(net.authorize.api.contract.v1.TransactionRequestType txnRequest) protected net.authorize.Environment
configureEnvironment
(Map parameters) protected net.authorize.api.contract.v1.MerchantAuthenticationType
configureMerchantAuthentication
(Map parameters) protected net.authorize.api.contract.v1.PaymentType
configurePayment
(Map parameters) protected net.authorize.api.contract.v1.CustomerProfilePaymentType
configureProfileBeingUsedForPayment
(Map parameters) protected void
configureReferenceFields
(net.authorize.api.contract.v1.TransactionRequestType txnRequest, Map parameters) protected net.authorize.api.contract.v1.NameAndAddressType
configureShippingAddress
(Map parameters) protected net.authorize.api.contract.v1.SolutionType
configureSolution
(net.authorize.Environment env) protected net.authorize.api.contract.v1.CustomerProfilePaymentType
configureThatAProfileIsBeingRequested
(Map parameters) protected void
configureTotals
(net.authorize.api.contract.v1.TransactionRequestType txnRequest, Map parameters) protected void
configureTransactionSettings
(net.authorize.api.contract.v1.TransactionRequestType txnRequest, Map parameters) void
copyPaymentPaymentProfileToAddressForm
(net.authorize.api.contract.v1.CustomerPaymentProfileMaskedType paymentProfile, BillingAddressForm form) createCustomerProfile
(Customer customer, Map parameters) private net.authorize.api.contract.v1.SettingType
createJsonSetting
(String settingName, Map options) createPaymentProfile
(Map parameters) protected Map
createTransation
(Map parameters) deletePaymentProfile
(Map parameters) editPaymentProfile
(Map parameters) protected String
escapeAndTruncate
(String value, int maxWidth) protected String
hostedPaymentPage
(Map parameters) hostedProfilePage
(Map parameters) protected net.authorize.api.contract.v1.TransactionRequestType
initTransactionRequest
(Map parameters) Subclasses must override this method to execute processing.processAcceptHostedResponse
(Map parameters) processAuthCapture
(Map parameters) processAuthOnly
(Map parameters) protected Map
processErrorResponse
(Map parameters, String code, String message) processPriorAuthCapture
(Map parameters) protected Map
processResponse
(net.authorize.api.contract.v1.CreateTransactionResponse response, Map parameters) protected Map
processSuccessAcceptHostedResponse
(Map parameters, Map responseAsMap) protected Map
processSuccessResponse
(Map parameters, net.authorize.api.contract.v1.CreateTransactionResponse response) protected Map
processTransaction
(Map parameters) processVoid
(Map parameters) net.authorize.api.contract.v1.CustomerPaymentProfileMaskedType
retrievePaymentProfile
(String cimProfileID, String cimPaymentProfileID) List<net.authorize.api.contract.v1.CustomerPaymentProfileMaskedType>
retrievePaymentProfiles
(String cimProfileID, boolean includeExpired) retrieveUnsettledTransactionList
(Map parameters) Methods inherited from class com.softslate.commerce.businessobjects.payment.BasePaymentProcessor
findPaymentWithLiveInfo, processPayment, processPaymentCapture
Methods inherited from class com.softslate.commerce.businessobjects.core.BaseBusinessProcessor
formatDateTime, formatPrice, getAppComponents, getAppSettings, getAttributeIDs, getBusinessObjectFactory, getDaoFactory, getEventBus, getInjector, getProductIDs, getSettings, getUser, initialize, isProcessorClassActive, loadMatchingSkus, parseDateTime, parseResponseData, prepareRequestData, sendHTTPGet, sendHTTPPost, sendHTTPPost, setAppComponents, setAppSettings, setBusinessObjectFactory, setDaoFactory, setEventBus, setInjector, setSettings, setUser, updateOrderTotals, 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.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
Methods inherited from interface com.softslate.commerce.businessobjects.payment.PaymentProcessor
processPayment, processPaymentCapture
-
Field Details
-
log
static org.apache.commons.logging.Log log
-
-
Constructor Details
-
AuthorizeNetAPIProcessor
public AuthorizeNetAPIProcessor()
-
-
Method Details
-
process
Description copied from class:BasePaymentProcessor
Subclasses must override this method to execute processing. Called byBasePaymentProcessor.processPayment(Map)
.- Specified by:
process
in classBasePaymentProcessor
- 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
-
processAcceptHostedResponse
- Throws:
Exception
-
processAuthOnly
- Throws:
Exception
-
processAuthCapture
- Throws:
Exception
-
processPriorAuthCapture
- Throws:
Exception
-
processVoid
- Specified by:
processVoid
in interfacePaymentProcessor
- Overrides:
processVoid
in classBasePaymentProcessor
- Throws:
Exception
-
processTransaction
- Throws:
Exception
-
createTransation
- Throws:
Exception
-
createPaymentProfile
-
configureEnvironment
-
configureMerchantAuthentication
protected net.authorize.api.contract.v1.MerchantAuthenticationType configureMerchantAuthentication(Map parameters) -
initTransactionRequest
protected net.authorize.api.contract.v1.TransactionRequestType initTransactionRequest(Map parameters) -
configureSolution
protected net.authorize.api.contract.v1.SolutionType configureSolution(net.authorize.Environment env) -
configureProfileBeingUsedForPayment
protected net.authorize.api.contract.v1.CustomerProfilePaymentType configureProfileBeingUsedForPayment(Map parameters) -
configureThatAProfileIsBeingRequested
protected net.authorize.api.contract.v1.CustomerProfilePaymentType configureThatAProfileIsBeingRequested(Map parameters) -
configurePayment
-
configureTotals
protected void configureTotals(net.authorize.api.contract.v1.TransactionRequestType txnRequest, Map parameters) -
configureReferenceFields
protected void configureReferenceFields(net.authorize.api.contract.v1.TransactionRequestType txnRequest, Map parameters) -
configureTransactionSettings
protected void configureTransactionSettings(net.authorize.api.contract.v1.TransactionRequestType txnRequest, Map parameters) -
configureBillingAddress
-
configureShippingAddress
-
escapeAndTruncate
-
escapeForIFrameCommunicator
-
processResponse
protected Map processResponse(net.authorize.api.contract.v1.CreateTransactionResponse response, Map parameters) throws Exception - Throws:
Exception
-
processSuccessResponse
protected Map processSuccessResponse(Map parameters, net.authorize.api.contract.v1.CreateTransactionResponse response) throws Exception - Throws:
Exception
-
processSuccessAcceptHostedResponse
protected Map processSuccessAcceptHostedResponse(Map parameters, Map responseAsMap) throws Exception - Throws:
Exception
-
processErrorResponse
- Throws:
Exception
-
retrieveUnsettledTransactionList
-
createCustomerProfile
- Throws:
Exception
-
retrievePaymentProfiles
-
retrievePaymentProfile
public net.authorize.api.contract.v1.CustomerPaymentProfileMaskedType retrievePaymentProfile(String cimProfileID, String cimPaymentProfileID) throws Exception - Throws:
Exception
-
copyPaymentPaymentProfileToAddressForm
public void copyPaymentPaymentProfileToAddressForm(net.authorize.api.contract.v1.CustomerPaymentProfileMaskedType paymentProfile, BillingAddressForm form) -
editPaymentProfile
-
deletePaymentProfile
-
hostedProfilePage
-
hostedPaymentPage
-
configureCustomerIdInSessionAndTransactionRequest
private String configureCustomerIdInSessionAndTransactionRequest(net.authorize.api.contract.v1.TransactionRequestType txnRequest) -
createJsonSetting
-