public class AuthorizeNetBaseAction extends BaseGatewayAction
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
log
The
Log instance for this application. |
protected java.lang.String |
loginId |
protected java.lang.String |
transactionKey |
protected java.lang.String |
webServiceURL |
ACTION_CONFIRM_ORDER, ACTION_CUSTOMER_LOGIN, ACTION_ENTER_CHECKOUT, ACTION_NEW_CUSTOMER_VISIT, ACTION_PAYMENT_METHOD_SELECTED, ACTION_PRODUCT_VIEWED, ACTION_REMOVE_FROM_CART, AGREED_COOKIES, COOKIE_MAX_AGE_IN_SECS, CUSTOMER_LOCALE, CUSTOMER_NAME, CUSTOMER_UUID, GUEST_CUSTOMER_ID, KKLOGIN, SEO_DELIM, SEO_DIRECTORY, SEO_OFF, SEO_PARAMETERS, SEO_PRODS_FOR_MANU, SEO_PRODS_FOR_MANU_CODE, SEO_SEARCH_BY_MANU_BY_LINK, SEO_SEARCH_BY_MANU_BY_LINK_CODE, SEO_SEL_CAT, SEO_SEL_CAT_CODE, SEO_SEL_PROD, SEO_SEL_PROD_CODE, SEO_TYPE, SEO_TYPE_LENGTH, strutsSession, TAG_BIRTH_DATE, TAG_CART_TOTAL, TAG_CATEGORIES_TIME_VIEWED, TAG_CATEGORIES_VIEWED, TAG_COUNTRY_CODE, TAG_IS_MALE, TAG_LOGIN_DATE, TAG_MANUFACTURERS_TIME_VIEWED, TAG_MANUFACTURERS_VIEWED, TAG_ORDER_PAGE_SIZE, TAG_PROD_PAGE_SIZE, TAG_PRODUCTS_IN_CART, TAG_PRODUCTS_IN_WISHLIST, TAG_PRODUCTS_TIME_IN_CART, TAG_PRODUCTS_TIME_IN_WISHLIST, TAG_PRODUCTS_TIME_VIEWED, TAG_PRODUCTS_VIEWED, TAG_REVIEW_PAGE_SIZE, TAG_SEARCH_STRING, TAG_WISHLIST_TOTAL, WELCOME
Constructor and Description |
---|
AuthorizeNetBaseAction() |
Modifier and Type | Method and Description |
---|---|
protected void |
customizeConnection(java.net.HttpURLConnection connection,
com.konakart.appif.PaymentDetailsIf pd,
java.util.List<com.konakart.appif.NameValueIf> paramList)
Add things specific to AuthorizeNet to the connection
|
protected void |
getAuthNetAuthentication(KKAppEng kkAppEng)
Get information from the AuthorizeNet module
|
protected java.lang.String |
getGatewayResponse(java.lang.StringBuffer msg,
java.lang.String methodName)
Get a response from the gateway
|
protected java.lang.String |
getGatewayResultDescription(java.lang.String code)
Adds a description to the Gateway Result
|
protected java.lang.StringBuffer |
getMessage(java.lang.String name,
java.lang.StringBuffer innerMsg)
Create the full message
|
protected java.lang.StringBuffer |
getMsgAuthentication()
Create the authentication part of the message
|
protected java.lang.String |
getRespDesc(int position)
Authorize.net returns a response as delimiter separated variables.
|
protected java.lang.String |
sendMsgToGateway(KKAppEng kkAppEng,
java.lang.StringBuffer msg,
java.lang.String methodName,
java.lang.String retAttr,
int custId,
java.lang.String profileId)
Common code to send a message and receive a response
|
protected boolean |
validateGatewayResponse(KKAppEng kkAppEng,
java.lang.StringBuffer msg,
java.lang.String methodName,
int custId,
java.lang.String profileId,
org.w3c.dom.Document doc)
Common code to validate the gateway response.
|
addParameters, customizeConnection, getCustomerIPAddress, getData, getGatewayRequest, getLogFileDirectory, getParameterFromPaymentDetails, hashParameters, postData, postData, saveIPNrecord, saveIPNrecord, sendOrderConfirmationMail, sendOrderConfirmationMail, validateOrder
changeSession, checkSSL, escapeFormInput, getBaseURL, getCustomerEvent, getForward, getJspEng, getKKAppEng, getKKCookie, getKKCookie, getRedirectURL, handleException, insertCustomerEvent, insertCustomerEvent, insertCustomerEvent, insertCustomerEvent, insertCustomerEvent, kkURLEncode, loggedIn, loggedIn, loggedIn, login, manageCookieLogout, noNull, setJspEng, setKKCookie, setKKCookie, setServletRequest, setSession, setupResponseForSEORedirect, setupResponseForSSLRedirect, updateRecentlyViewedProducts
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, doDefault, execute, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getFormatted, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, validate
protected org.apache.commons.logging.Log log
Log
instance for this application.protected java.lang.String loginId
protected java.lang.String transactionKey
protected java.lang.String webServiceURL
protected void getAuthNetAuthentication(KKAppEng kkAppEng) throws com.konakart.app.KKException
kkAppEng
- the kkAppEngcom.konakart.app.KKException
- an unexpected KKException exceptionprotected java.lang.String sendMsgToGateway(KKAppEng kkAppEng, java.lang.StringBuffer msg, java.lang.String methodName, java.lang.String retAttr, int custId, java.lang.String profileId) throws java.lang.Exception
kkAppEng
- the kkAppEngmsg
- the msgmethodName
- the methodNameretAttr
- the retAttrcustId
- the custIdprofileId
- the profileIdjava.lang.Exception
- an unexpected exceptionprotected boolean validateGatewayResponse(KKAppEng kkAppEng, java.lang.StringBuffer msg, java.lang.String methodName, int custId, java.lang.String profileId, org.w3c.dom.Document doc)
kkAppEng
- the kkAppEngmsg
- the msgmethodName
- the methodNamecustId
- the custIdprofileId
- the profileIddoc
- the docprotected java.lang.String getGatewayResponse(java.lang.StringBuffer msg, java.lang.String methodName) throws java.lang.Exception
msg
- the msgmethodName
- the methodNamejava.lang.Exception
- an unexpected exceptionprotected java.lang.StringBuffer getMsgAuthentication()
protected java.lang.StringBuffer getMessage(java.lang.String name, java.lang.StringBuffer innerMsg)
name
- the nameinnerMsg
- the innerMsgprotected void customizeConnection(java.net.HttpURLConnection connection, com.konakart.appif.PaymentDetailsIf pd, java.util.List<com.konakart.appif.NameValueIf> paramList)
customizeConnection
in class BaseGatewayAction
connection
- the HTTP connection objectpd
- the Payment DetailsparamList
- Additional parameters (typically credit card details but can also be any
miscellaneous extra parameters that may be required)protected java.lang.String getRespDesc(int position)
position
- the positionprotected java.lang.String getGatewayResultDescription(java.lang.String code)
code
- the codeCopyright © 2011 DS Data Systems UK Ltd.