I'm seeking advice on how to essentially redirect an Episerver form to a payment page immediately after submission, including the form's field information (amount and number). The goal is to redirect the user to a payment gateway when they click "Make Payment," passing along the input from the Episerver form. Essentially, I want to redirect to the payment page with the field information on submission, and let the payment gateway handle the rest.
I attempted to use the "Trigger webhook after submission" option, but unfortunately, it didn't work as expected.
I'm curious if Episerver provides a built-in mechanism to achieve this, or if customization of the form submission method through code changes is necessary. Any insights or guidance would be greatly appreciated!
THis is where the form submission redirect which is a payment gateway with epi form fields



It's not clear from your question how the payment gateway expects to receive the information it needs to process the payment. I'll assume that you can send it via querystring for the purposes of this answer.
To modify the URL you post to you can override the
BuildReturnResultForSubmitActionmethod onDataSubmissionService.Register dependency:
Inherit and override:
The values from the form submission is available in
submissionInfo.Keep in mind that this code would execute for all form submissions so additional checks would be needed to only run the redirect logic for specific forms.
Code in this answer modified from this post on Optimizely World: https://world.optimizely.com/forum/developers-add-ons-forum/Forms/thread-container/2018/11/redirect-user-from-custom-actor-to-dynamically-generated-url/