Bank of America has been ordered to pay millions of dollars to customers over charges of illegally charging junk fees and opening fake accounts.