None of it is illegal. It's just a violation of the merchant account agreement. The worst that can happen if you complain is that they will lose the ability to accept credit cards at all.
In many states, including New York, California, Colorado, and a few others, it is actually a crime for them to add a surcharge to a credit card transaction.
For example, in New York, levying a surcharge is a misdemeanor punishable by a fine of up to $500, one year in prison, or both.
And also potentially lose a lot of money in fines. They keep your money for a bit until it clears, so your fines come out of that and you don't have the ability not to pay them.