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:
<?php
if (!isset($_POST['form_type']) {
display_form_selection();
} else {
switch ($_GET['form_type']) {
case 'credit_card': display_form('credit_card');
exit;
case 'cash': display_form('cash');
exit;
default: display_form_selection();
die()
}
}
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.