Assume someone received some service (for example, had his hair cut) and had made the payment using his credit card. What if this transaction was declined later? Does he still owe the money that he was supposed to pay? From the shop's point of view, how can the shop charge this customer then, after he has left?
If the service was provided, you must pay for it. A declined credit card is like a bounced check in this regard: the service provider is still owed payment.
From the shop's point of view, they are probably out of luck. The amount is likely too small to bother to pursue in small claims court, and their only recourse is to dispute the chargeback with the credit card company.
I'm not sure if you represent the shop or the customer, but the right thing to do (regardless of jurisdiction and law) is to pay for the haircut! If you're the shop owner, I'd recommend figuring out how the charge was declined after the fact and look for ways to avoid similar situations in the future. If you're the customer, please realize that you need to pay and make it right. Just because you can get away with something doesn't mean you should.
The purpose of running the card through the reader is to get authorization from the network. If the transaction is later denied, then that is a dispute that the business owner has to make with the network.
This has to be a very rare situation, or the business owner would never accept a credit card/debit card. The fee that is charged by the network is to cover the risk that the network has in addition to their costs.
A few years ago in the US as we were changing to using cards with chips, the carrot that the networks used was how the risk of a fraudulent transaction would be assigned if the store didn't install the new readers. No new reader meant that if there was some kinds of fraud, then the store would cover the loss. But if they installed the new readers, then the network covered the risk.
For some businesses they can contact the individual because they have more information about the customer, but in some cases the transaction is essentially anonymous. In those cases the only info they have is related to the info on the card that was ultimately denied.
Ultimately the customer is responsible, so the denied transaction doesn't absolve them of the debt.