While it is frustrating and inconvenient, in many cases, your card may be declined for your protection.
Remind yourself that many of the people around you have probably had the same experience. You or the cashier may feel added pressure depending on the length of the line behind you.
There are a lot of dynamics that arise with a declined credit card.