Class HostedPaymentServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
com.avoka.fc.core.servlet.BaseServlet
com.avoka.fc.core.servlet.payment.HostedPaymentServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet
,jakarta.servlet.ServletConfig
,Serializable
- Direct Known Subclasses:
HostedPaymentCallback
,HostedPaymentCancel
,HostedPaymentError
,HostedPaymentResponse
Provides a servlet that handles payment responses from a hosted payment service.
- Since:
- 4.0.0
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
A Enum to represent the payment callback types -
Field Summary
Fields inherited from class com.avoka.fc.core.servlet.BaseServlet
PAGE_InvalidRequest, PAGE_Offline
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
executeRequest
(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) Handles a payment callback from a hosted payment gateway.protected HostedPaymentServlet.CALLBACK_TYPE
getCallbackType
(jakarta.servlet.http.HttpServletRequest req) protected ErrorLogService
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, hasPermission, hasPermission, hasPermission, listServletInfo, sendRedirect, sendResponseError
Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, init, service, service
Methods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
HostedPaymentServlet
public HostedPaymentServlet()
-
-
Method Details
-
getErrorLogService
- Specified by:
getErrorLogService
in classBaseServlet
- Returns:
- the servlet error log service
-
executeRequest
protected void executeRequest(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.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(jakarta.servlet.http.HttpServletRequest req)
-