Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Micros Simphony - How to get Mag Swipe Data C# Extensibility

Status
Not open for further replies.

Mohamed Muflahi

Programmer
May 30, 2024
3
0
0
US
I am trying to get Mag Stripe Data from the built-in swiper on an Oracle workstation, I am running the following function and it is detecting the swipe, but all three tracks aren't printing a value, even though the card does have data on it (it is a gift card, which has numbers on track 2).



[ExtensibilityMethod]
public void ReadGiftCard()
{
var parms = new Micros.Ops.Input.RequestEntryParameters();
parms.AllowMagCard = true;
parms.RequestEntryType = Micros.Ops.Input.RequestEntryType.String; //I've tried default and numeric as well same issue
var response = OpsContext.RequestEntry(parms);
if (response.EntryMethod == Micros.Ops.Input.ResponseEntryMethod.MagCard)
{
var mag = response as Micros.Ops.Input.InputResponseMagCard;

OpsContext.ShowMessage(string.Format("Track1", mag.Track1));
OpsContext.ShowMessage(string.Format("Track2", mag.Track2));
OpsContext.ShowMessage(string.Format("Track3", mag.Track3));
}
}
 
for anyone who needs this. the code works... I was not getting the OpsContext to display the value. Yea, I'm kind of an idiot.
code below is what i am using for my purposes of gift card swipes, which has the data on track 2 in the format of ";1233546789?"
[ExtensibilityMethod]
public async Task ReadCardNum()
{
var parms = new Micros.Ops.Input.RequestEntryParameters();
parms.AllowMagCard = true;
parms.Prompt = "Swipe Gift Card";
parms.Title = "BALANCE INQUIRY";
parms.AllowManualEntry = true;
parms.RequestEntryType = Micros.Ops.Input.RequestEntryType.Default;
var response = OpsContext.RequestEntry(parms);
if (response.EntryMethod == Micros.Ops.Input.ResponseEntryMethod.MagCard) {
var mag = response as Micros.Ops.Input.InputResponseMagCard;
var track2 = mag.Track2;

await Inquiry(track2);

}
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top