The full app is a multi-page tourism insurance application. Normally, the person applying for the insurance is the same persion paying for it. When that's the case, the standard embedded accept.js generated form, with the name and postal code fields turned off, is more than fine, as we already have that information encrypted and stored elsewhere.
However there's a "Option B" where the payee might be a 3rd party entity - a medical tourism travel agency or something. If that's the case, that specific information isn't recorded along with the application, and may not even be known until later after the completed application is approved and ready for payment. If that's the case, then I need to have company, name, address fields available on the payment form. Unfortunitely, the embedded generated form doesn't have the option to display address fields.
Doing some experimentation, I've found I can wrap my own extra needed fields inside the accept.js form tag inside a div, style them to look like I want, and when the form is submitted, the credit card info is passed directly to authorize.net, bypassing our servers as it should be, and the custom fields are sent directly to the processing page where I can add those fields to the processing script along with the nonce information that's submitted for payment.
A couple of conditional statements pick where the the name and address information is coming from - either a database call to the original record, or the custom fields in case of a 3rd party.
Initial tests seem OK.
I just wish I understood why authorize.net decided NOT to include billing address fields on the generated forms, as that would solve my entire problem with no addition coding needed. Should be an option!