I believe that if you have a merchant agreement with a CC, you are NOT allowed to discount for cash. People do it, but it's not appropriate.
Merchants can't charge a surcharge for using a card, but they are permitted (at least by federal law in the US) to offer a discount for using cash. The card brands have guidelines a merchant must follow, but it can be done.
Then I know several smaller businesses/restaurants in the US breaking the law if this is indeed fact. We were in a small but very busy bakery a few days ago with a sign indicating a 50 cent charge for the use of a credit card.