Periodically a credit card will be denied, and sometimes a card in an ATM will be too.
I did my homework and found that the issue is usually the lack of a good connection. It could be a phone line, an internet link, something that isn't just quite right. If all is not perfect, DENIED!!!! I'm glad that is the case, even though it can be very inconvenient.
Gas stations now, at least the ones we have been using for years either have a handheld device so your card never leaves your sight or a cashier window where you take it there yourself and watch them process it.
We just went through a series of ATM/Debit card hassles. His card is our backup, has never been used, lives in our safe. It got hacked. The replacement one too. The newest one is still in California waiting to come down with someone. So far, it's OK. Again, it's been explained to me that it usually is not where you used the card, but a method of creating numbers and using them. Who knows? His card had never been used.
The fees for credit card use vary greatly from bank to bank. If you do your homework, there are cards for both US and Canadians that have absolutely no charges. We even get 1.5% back on all purchases! The only charge we incur is the one charged by bank that owns the ATM. Our current favorite to use is INBURSA, their charge per use is 17.4 pesos.