Hi,
Modifying the code here won't help.
As you say, these parameters are not necessary for AIM, only for SIM.
You can see these error messages:
* x_show_form : The parameter x_show_form is required
* x_show_form : Parameter x_show_form must be PAYMENT_FORM
So your payment gateway tells you that x_show_form should be PAYMENT_FORM and that it should be there.
And if you look at the documentation for authorize.net for that parameter, you can find this:
x_show_form Value: The payment form request.
Format: PAYMENT_FORM.
Notes: This field indicates that the merchant would like to use the payment
gateway hosted payment form to collect payment data.
www.authorize.net/support/SIM_guide.pdf
That indicates that the x_show_form parameter can only have the PAYMENT_FORM value and that this tells the payment gateway to display the credit card form on the payment gateway payment page (and you can see that this documentation is specifically for SIM, not AIM).
So what all that means is that your payment gateway only supports SIM not AIM. Copying the code for SIM for the AIM mode in the payment gateway won't change that fact and it will just mess up the code.
The solution here is to use SIM.