This is big news for retailers, who have to pay a fee, often referred to as a "swipe fee," when a customer pays with plastic. Especially for small retailers, these swipe fees can quickly add up and take a bite out of paper-thin operating margins. For banks, these processing fees rake in serious revenue.

The strongly worded ruling from Judge Leon was in a case brought against the governors of the Federal Reserve by a group of plaintiffs including the National Association of Convenience Stores, the National Retail Federation, the Food Marketing Institute, Miller Oil Co., Boscov's Department Store and the National Restaurant Association. Judge Leon set another court date of August 14 to discuss future steps in determining how debit card purchases should be paid for.

"Retailers welcome today's ruling and the opportunity to ensure the law is finally implemented as intended," said Bill Hughes, senior vice president for government affairs at the Retail Industry Leaders Association, in a statement. "The flawed Federal Reserve rules have muted the law's intended benefits to merchants and consumers and resulted in further distortions in the already broken electronic payments market." The RILA is a trade organization representing retail companies.

The Federal Reserve Board is “reviewing the judge’s opinion,” according to spokeswoman Barbara Hagenbaugh.

Meanwhile, the banking industry is, not surprisingly, dismayed by the judge’s ruling, saying that large and small banks will see their revenues squeezed. “We’re deeply disappointed in today’s court decision, which will harm banks of all sizes and make it more difficult for institutions to serve their customers,” says Frank Keating, president of the American Bankers Association, a trade group representing the industry, in a statement.

Keating called for the Judge’s ruling to be reversed. “We urge the Federal Reserve to pursue all legal means to mitigate the harm this decision will cause to consumers, community banks and all institutions that provide financial services to local communities,” he says.

Then, in 2011, the Federal Reserve set the limit for debit card swipe fees at a much more lenient rate for banks than they first proposed. Before the Fed's ruling in 2011, the debit-card swipe fee was 1 to 2 percent of each transaction, which was about 44 cents on the average retail purchase of $38. For pricier purchases, that would equal a few dollars.

"Today's decision is a victory for small businesses and consumers across the country," said the Merchants Payments Coalition, a group of retailers, fuel stations, online merchants and other businesses that work to ensure transparency in the credit-card processing industry, in a statement. "Considering that this cost is, on average, 4 cents per transaction, the current fee of more than 21 cents is exorbitantly high -- raising prices for consumers and squeezing merchants' bottom lines, particularly for businesses with a high volume of low-dollar sales."