There's an off-the-shelf USB that you can buy called a Teensy[1] that is programmable and automatically registers itself as a USB HID. Very similar to what is described here.
The problem with any type of hardware/usage like this is that it's susceptible to offline attacks, which widens the attack surface greatly. A better way to do this would be to encrypt any data that you need to store on the card. And an even better way would be to communicate with a server and have it validate the transaction.