Very frequently, as i make a purchase in the market or some store and pay with my credit card, the card reader fails in its reading purpose. Then, the person behind the counter takes a nylon bag, wraps the credit card in it and pass the card again through the reader machine. Invariably the reading process is now successful and the paying process finished.
The question is how the reader, the nylon bag and the card magnetic band interact to enhance the reading ability of the machine.
Actually, to my understanding, this has little to nothing to do with magnetism, and everything to do with friction.
Newer cards have a shiny, slick laminated layer on the top with a very low coefficient of friction. Older cards have usually lost most or all of this layer, and they have lots of nicks and scratches to boot.
When a card is swiped through a standard card reader, the reading head expects a smooth passage of the magnetic stripe. It can compensate for variations in speed, which is why you can swipe slow or fast (or both in a single swipe), but even if the speed varies, the passage of the stripe must be smooth.
When a card has that smooth, slick layer, it can slip past the reading head very smoothly. But when the card is old, and the surface has a high coefficient of friction and/or scratches, the reader head can "snag" and skip as it reads. This produces dips and spikes in the signal that is read, which confuse the reader, and it says bad card.
By wrapping the card in plastic (or even paper, sometimes, but you can see why nylon bags are a very good choice), the cashier is lowering the coefficient of friction of the surface and/or smoothing over the nicks and scratches. That means the card can again pass smoothly past the reading head. As long as the magnetic data is intact, this means the card will read again.
This problem is also known to me, on my work the visitors need to use there e-ID card to enter the property. Sometimes the e-ID will not work and then i use my T-shirt or sweater and rub the card clean and then the card works. I say to the people that this has to do with static electricity.
Every card like bank cards and so ever, has to suffer this.
So it is no big deal. So i recommend in the future that you rub your credit card every time you go to use it.
I think the problem has now disappeared, at least for the users of cards which have a mini-chip on board (all new credit card released in Europe have it now), as it does not require to be stripped through.
Indi, thank for your appreciation on the problem, your explanation almost convince me. I should try with paper and other materials first, as you said it would work too. It is a good point too that rubbing the surface with a shirt works fine (as Lord Klorel said), as this action smoothen the surface and strengthen your theory.
You are probably just wiping dirt off of the card...