I own a retail business. I have a sign between the cash register and the credit card terminal warning customers that it costs them 4% more to pay by card than cash. It also shows on their receipt that they paid the 4% additional for using a card.
Nobody cares.
Customers would rather pay a few % more for the convenience of card over cash. Admittedly, transactions at my store are usually small, so it is just cents per transaction -not $$ per. I can go entire days without a single cash payment. It is the way of the world now. My store is in a touristy area, so many customers are travelers, which may influence their carrying of cash and their willingness to pay fees -i.e. enjoy the vacation and don't sweat the small costs.
It is legal to charge card fees separately... but it may be a violation of the merchant services agreement, so most merchants do not. If I could not charge this fee, I would have to raise all prices to compensate. Everyone would just pay a bit more and never know why.
Most customers are content with the prices we charge. Some complain it is too much, some say it is worth more. There is a balance to maintain between profit/item and sales volume. Raising prices would increase the profit margin, but likely lower the volume. We see it when we run a sale -people buy more stuff at the lower prices temporarily increasing operating revenue, but lowering profit margins.. Neither good nor bad, but a different balance point. Card fees shift this balance point.