Ok... I got it to work. Hope this helps everybody.
Its not a problem with the script. Don't comment out the script. I was on the Live help with Authorize.net for a couple of hours now.
Thurns out you need to make sure that certain fields are not required for your authorization to go through.
Go to
https://account.authorize.net
Click on the following:
Under "Account"
Click=> Settings
Click=>Payment Form
Click=>Form Fields
You should come to a page that looks like this. Fill it in with your personal settings similar to this.
Remember:
**If you require it here, and you don't require it in OSCommerce account setup, your customers will recieve an error for those blank fields and payment will be impossible.**
With the line of code I put above, you can now require an invoice number.
-------------------------------------------------------------------------------------------------------------------------------------------
Payment-Form Fields
Field Name--------------------------------------View-------------Edit------------Required
Payment Information
Recurring Billing Transaction-----------------o-----------------o------------------o
Card Code------------------------------------------o-----------------o------------------o
Order Information
Invoice No---------------------------------------x------------------o------------------x
Description--------------------------------------x------------------o------------------x
Customer Billing Information
First Name--------------------------------------x------------------x------------------x
Last Name--------------------------------------x------------------x------------------x
Company---------------------------------------x------------------x------------------o
Address-----------------------------------------x------------------x------------------x
City----------------------------------------------x------------------x------------------x
State--------------------------------------------x------------------x------------------x
Zip Code----------------------------------------x------------------x------------------x
Country-----------------------------------------x------------------x------------------o
Phone-------------------------------------------x------------------x------------------o
Fax----------------------------------------------x------------------x------------------o
Email--------------------------------------------x------------------x------------------x
Customer ID-----------------------------------x------------------o------------------x
Shipping Information
First Name--------------------------------------x------------------x------------------x
Last Name--------------------------------------x------------------x------------------x
Company---------------------------------------x------------------x------------------o
Address-----------------------------------------x------------------x------------------x
City----------------------------------------------x------------------x------------------x
State--------------------------------------------x------------------x------------------x
Zip Code----------------------------------------x------------------x------------------x
Country-----------------------------------------x------------------x------------------o
Additional Information
Tax-----------------------------------------------o-----------------o------------------o
Freight-------------------------------------------o-----------------o------------------o
Duty----------------------------------------------o-----------------o------------------o
Tax Exempt--------------------------------------o-----------------o------------------o
PO Number--------------------------------------o-----------------o------------------o
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
Let me know if this helps anybody.
Joshua Morris