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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected net.authorize.api.contract.v1.CustomerAddressTypeconfigureBillingAddress(Map parameters) private StringconfigureCustomerIdInSessionAndTransactionRequest(net.authorize.api.contract.v1.TransactionRequestType txnRequest) protected net.authorize.EnvironmentconfigureEnvironment(Map parameters) protected net.authorize.api.contract.v1.MerchantAuthenticationTypeconfigureMerchantAuthentication(Map parameters) protected net.authorize.api.contract.v1.PaymentTypeconfigurePayment(Map parameters) protected net.authorize.api.contract.v1.CustomerProfilePaymentTypeconfigureProfileBeingUsedForPayment(Map parameters) protected voidconfigureReferenceFields(net.authorize.api.contract.v1.TransactionRequestType txnRequest, Map parameters) protected net.authorize.api.contract.v1.NameAndAddressTypeconfigureShippingAddress(Map parameters) protected net.authorize.api.contract.v1.SolutionTypeconfigureSolution(net.authorize.Environment env) protected net.authorize.api.contract.v1.CustomerProfilePaymentTypeconfigureThatAProfileIsBeingRequested(Map parameters) protected voidconfigureTotals(net.authorize.api.contract.v1.TransactionRequestType txnRequest, Map parameters) protected voidconfigureTransactionSettings(net.authorize.api.contract.v1.TransactionRequestType txnRequest, Map parameters) voidcopyPaymentPaymentProfileToAddressForm(net.authorize.api.contract.v1.CustomerPaymentProfileMaskedType paymentProfile, BillingAddressForm form) createCustomerProfile(Customer customer, Map parameters) private net.authorize.api.contract.v1.SettingTypecreateJsonSetting(String settingName, Map options) createPaymentProfile(Map parameters) protected MapcreateTransation(Map parameters) deletePaymentProfile(Map parameters) editPaymentProfile(Map parameters) protected StringescapeAndTruncate(String value, int maxWidth) protected StringhostedPaymentPage(Map parameters) hostedProfilePage(Map parameters) protected net.authorize.api.contract.v1.TransactionRequestTypeinitTransactionRequest(Map parameters) Subclasses must override this method to execute processing.processAcceptHostedResponse(Map parameters) processAuthCapture(Map parameters) processAuthOnly(Map parameters) protected MapprocessErrorResponse(Map parameters, String code, String message) processPriorAuthCapture(Map parameters) protected MapprocessResponse(net.authorize.api.contract.v1.CreateTransactionResponse response, Map parameters) protected MapprocessSuccessAcceptHostedResponse(Map parameters, Map responseAsMap) protected MapprocessSuccessResponse(Map parameters, net.authorize.api.contract.v1.CreateTransactionResponse response) protected MapprocessTransaction(Map parameters) processVoid(Map parameters) net.authorize.api.contract.v1.CustomerPaymentProfileMaskedTyperetrievePaymentProfile(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, processPaymentCaptureMethods 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, utilsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.softslate.commerce.businessobjects.core.BusinessObject
initializeMethods 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, utilsMethods 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:BasePaymentProcessorSubclasses must override this method to execute processing. Called byBasePaymentProcessor.processPayment(Map).- Specified by:
processin classBasePaymentProcessor- Parameters:
parameters- AMapcontaining the values of the user's submitted payment information.- Returns:
- A
Mapcontaining 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, theMapmay 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:
processVoidin interfacePaymentProcessor- Overrides:
processVoidin 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
-