This came up in the 1980s in America with gas stations. Based on Federal and state law and credit card merchant agreements:
- It is not legal to charge additional surcharge for use of a credit card. However
- It is legal to discount for cash or a particular payment method.
So for instance it's legal for Target to offer 5% off when you use the Target credit card; it would not be legal to charge a 5% surcharge for using Visa/Mastercard. A gas station can charge 10 cents a gallon cheaper for cash.
So the restaurant's offer of a discount is totally acceptable.
It may be a bad business practice, but that's technically not your problem. The offerer may be an employee who has kept your order "off the books" and plans to embezzle your entire payment. The business may be having cash flow problems and needs cash today, and can't wait for the merchant clearinghouse. They may have messed up their relationship with the clearinghouse so their credit card payments are being frozen or delayed (e.g. they might have had a PCI-DSS breach). All of that being not your problem.