Previous Thread
Next Thread
Print Thread
Magstripe card reader #11388 05 Jun 18 12:29 PM
Joined: Oct 2001
Posts: 60
M
Maurice Marshall Offline OP
Member
OP Offline
Member
M
Joined: Oct 2001
Posts: 60
Does anyone have experience reading data from a Magstripe reader or a similar device. I need to know the possible methods used to access these kind of devices in ASHELL.
I have a USB MAGTEK Mini Magstripe reader with USB Emulation and 3 Tracks. The intent here is to initiate the device, request a swipe and submit the information read.

Re: Magstripe card reader #11389 05 Jun 18 01:04 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
I took a look at the Mag Tek Programming Reference Manual , which seems to only contemplate Windows. If that's acceptable to you, then it seems that you will be talking to the device either as a special file or as a COM port.

In the file case, you would probably open the device/file on two channels, one for output and one for input, although I'm not completely certain how well that will work. (A-ShellBASIC doesn't have a file access mode for a bidirectional stream.)

In the COM port case, you would probably want to use COMIO.SBR . (There is a sample/demo program for it in the 908054 directory of the EXLIB Repository .)

Assuming that the application is really running in the Linux environment, you'd have to implement the interface either as an SBX that can be called by ATE, or as a service running on a PC that can be accessed by any job on the server. The former scheme seems appropriate if each ATE workstation has it's own mag reader, while the latter would make more sense if a mag reader might be shared by several workstations.

For examples of SBXs called via ATE, see the 907033 directory of the SOSLIB Repository . Also, check out the Fn'ATE'SBX() function in the 907010 directory (aka SOSFUNC:) which simplifies calling an SBX remotely via ATE, including syncing the SBX if necessary.

In the case of a service, you'd probably implement it using TCP, i.e. the application on the Linux server would connect to the service via TCP to request a mag read. The service would communicate with the device via the file or serial interface, and respond back to the application via TCP. There are several examples of such TCP "servers" (minus the mag reader part) in the 908025 directory of the EXLIB.

As for the actual commands to control the reader, according to the manual it seems fairly straightforward. Essentially you send it text-based commands to set the configuration and request various operations, including reading a card. And you read back the text-based responses.

Sounds like a fun project! Then again, chances are that the result would be usable by others, more or less as is. So if someone has already implemented such an SBX or server, or has a similar interest, it would be a shame for each to have to develop it separately. If you don't have time to take it on yourself, there might be someone out that willing to take it on as a project for hire. (Maybe even us.)

Re: Magstripe card reader [Re: Maurice Marshall] #32234 25 Jan 20 06:46 PM
Joined: Nov 2007
Posts: 69
J
Jack Rupert Offline
Member
Offline
Member
J
Joined: Nov 2007
Posts: 69
I, too, am just starting to look into accepting credit cards (IE: need an interface app or reader interface). I have written a custom POS system for my microbrewery and now wish to accept credit cards so I can capture the swipe into the AShell POS (WIndows 10) as well as to the service for posting to my bank account (or clearing house). If anyone is doing this and wishes to share to save me some development, please, contact me at 701-226-3536 (Jack R. Rupert). In the meantime I am searching the web and talking with services out there.

Re: Magstripe card reader [Re: Maurice Marshall] #32235 25 Jan 20 08:22 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
We actually put together an interface for a particular credit card processor, ChargeItPro, at the request of one of our dealers a few years ago. (Apparently ChargeItPro has just merged or become Gravity Payments.) I believe a couple other A-Shell developer/dealers also picked it up and are still using it. We don't have any special relationship with them, and I'm not sure how they compare to their competitors, but we do make the interface available for free, as-is. As I recall they have some kind of simulator that would allow you to experiment without getting too heavy into it.

Re: Magstripe card reader [Re: Jack McGregor] #32236 27 Jan 20 11:51 PM
Joined: Nov 2007
Posts: 69
J
Jack Rupert Offline
Member
Offline
Member
J
Joined: Nov 2007
Posts: 69
Very cool. I will look them up and get back with you if needed. I will have another AShell customer for you if I can get this figured out. I wrote a slick POS system but need the card processing interface finished. Thanks, Jack.


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3