I got help with solving a problem in this thead: Redirect with POST data. Now that I decided that the whole site and even this function must work when JS is disabled I need
The reason they initially suggested AJAX is for user experience, and is not a requirement for a form to be able to post. You will need to either present the user with a separate step to choose a form or have the same page reload or load another page.
Some pseudocode for example:
Your form_selection() routine should draw a form which has a select, checkbox, radio button or whatever that will POST a string or integer (for the switch) back to the script you are running from.
When the page reloads it will call the correct display_form() based on the value it passed to itself. These functions will set up the form for whatever you want to post to the gateway.
I have read elsewhere on this site that using for your form action is not a good idea, and you should rather manually type your script name in.