I am new programmer using magnetic reader, and dont know how to begin coding.
Googled some links but couldn't figure out how to do it.
I am trying to develop a program where gift card needs to be generated , user swaps the card fills in details of customer on that card along with the amount. And in future the card swapped and amount is automatically deducted from the card.
What I understand is when card is swapped it generates a unique code, with that code the details are inserted in database. And once the card swapped again it finds that code in database pulls the details and then update or insert respective data in database.
Am I right? If yes then can anyone provide sample codes.
Thanks
Here is a tutorial about processing a credit card swiped on a USB card reader. It is a video, but the description is included in the link.
Credit card swipe
Sample code is included here.
And here is an older SO regarding reading magnetic cards:
catch input from a magnetic card reader to a variable