Parameters
Name | Type | Description |
---|---|---|
sessionId | UUID (str enc.), required | The formSessionId |
nonce | UUID (str enc.), required | The nonce |
redirectType | String (enum), required | Default: "HTTP303". Other possible value: "SSF" (self-submitting form). The type of redirect to perform. Typically an HTTP 303 response is returned, but in some cases a self-submitting form must be used to perform the redirect |
processSubmission | Boolean, required | Default: true If false, the skeleton processor will not be invoked but the redirect response will be returned. Used for the RealEx payment field type to not perform processing on the initial call that returns the self-submitting form (via redirectType), but to perform it on the second call into redirect resulting from the self-submitting form post (with a redirectType of HTTP 303) |
The redirect HTTP method functions as the redirect target for form actions that require the user to be redirected to an external service before returning and resuming form processing (eg the payment field types).
Form processing for the page containing the field type for the external service must be suspended until coming back from the external service in order for the Forms Service and field types to be aware of any results from such a redirection. For example information on whether or not a PayPal payment was successful must be available to the control skeleton scripts to decide whether to advance to the "payment complete" page, or the "payment failure" page.
Example
- Render form page that contains the external service field type
- Upon submission of the page the external service field type's ExecutePreRedirectActionSkel is executed which:
- Does what is required before redirecting the user to the external service, such as creating some form of transaction
- Specifies the /http/redirect endpoint as the URL to return to after coming back from the external service, containing the sessionId and nonce as query parameters
- Generates a REDIRECT action with the URL property set to the appropriate external service URL supplying any identifiers generated when the transaction was created (control processing is not yet performed as part of the form submission as we do not yet have the results of the external transaction which may influence them.When a REDIRECT action is processed control processing is postponed until the external service redirects back to the /http/redirect endpoint)
- The user is redirected to the external service
- After interaction with the external service is complete, the service redirects the user to the previously specified return URL - the /http/redirect endpoint.
- The /http/redirect endpoint:
- Initialises the Skeleton Processor, setting the variables described below, which can be read by all skeletons
- Updates form data
- Performs control processing
Skeleton Processor Variables on Redirect
Name | Type | Description |
---|---|---|
Props["REDIRECT"] | Boolean | true allows easy |
Props["REDIRECTQUERYPARAMS"] | Map<String,String> | Param Name: Value |
Props["REDIRECTHEADERS"] | Map<String,String> | Header Name: Value |
Props["REDIRECTFIELDS"] | Map<String,List<String>> | Field Name: Array of values Non-null if invoked as a multipart request |
Props["REDIRECTBODY"] | String | Post request body as a string if non-multipart, null otherwise |
Last modified on June 27, 2023