I believe that's more likely to generate a criminal charge
Then how about paying after ordering and eating a meal?
Depends.
If there was a posted notice that no cash is accepted it's unlikely you'll get a criminal charge, but you can get civilly sued. Most places will just accept the cash then put up a picture saying "If this asshole shows up again, trespass him"