Class HostedPaymentServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- com.avoka.fc.core.servlet.BaseServlet
-
- com.avoka.fc.core.servlet.payment.HostedPaymentServlet
-
- All Implemented Interfaces:
Serializable
,Servlet
,ServletConfig
- Direct Known Subclasses:
HostedPaymentCallback
,HostedPaymentCancel
,HostedPaymentError
,HostedPaymentResponse
public class HostedPaymentServlet extends BaseServlet
Provides a servlet that handles payment responses from a hosted payment service.- Since:
- 4.0.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HostedPaymentServlet.CALLBACK_TYPE
A Enum to represent the payment callback types
-
Field Summary
-
Fields inherited from class com.avoka.fc.core.servlet.BaseServlet
PAGE_InvalidRequest, PAGE_Offline
-
-
Constructor Summary
Constructors Constructor Description HostedPaymentServlet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
executeRequest(HttpServletRequest req, HttpServletResponse resp)
Handles a payment callback from a hosted payment gateway.protected HostedPaymentServlet.CALLBACK_TYPE
getCallbackType(HttpServletRequest req)
protected ErrorLogService
getErrorLogService()
-
Methods inherited from class com.avoka.fc.core.servlet.BaseServlet
doGet, doPost, getDataContext, getDeploymentPropertyDao, getErrorPagePath, getLogger, getMultiPartRequestMap, getParameterString, getParameterString, getParameterStringTrim, getRequest, getRequestParameters, getResponse, handleException, handleRequest, listServletInfo, sendRedirect, sendResponseError
-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
-
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
-
-
-
-
Method Detail
-
getErrorLogService
protected ErrorLogService getErrorLogService()
- Specified by:
getErrorLogService
in classBaseServlet
- Returns:
- the servlet error log service
-
executeRequest
protected void executeRequest(HttpServletRequest req, HttpServletResponse resp)
Handles a payment callback from a hosted payment gateway. This servlet uses the payment log key or submit key as preference to identify the payment log that is to be updated. If the paymentLogKey or submitKey is not provided then it is assumed that the parameters are encrypted. In this case the URL path is expected to contain the organisation name where the associated payment gateway will be used to identify the payment log to be updated.- Specified by:
executeRequest
in classBaseServlet
- Parameters:
req
- the HttpServletRequestresp
- the HttpServletResponse
-
getCallbackType
protected HostedPaymentServlet.CALLBACK_TYPE getCallbackType(HttpServletRequest req)
-
-