I want to make program to talk between a Bank and POS Terminal Devices without using any third party tools. Let's assume that, currently, this program will only be used to talk with a specific bank through bank switching IP address + Port number.
Firstly, let's assume that I get this output by swiping a credit card at a POS terminal.
%B1234123412341234
^CardUser/John^030510100000019301000000877000000?;1234123412341234=0305101193010877?
Then I categorize this raw data to Track 1, Format B, and Track 2, according to this wiki link.
Track 1 Format B
%
B
1234123412341234
^
CardUser/John
^
0305
101
00000019301000000877000000
?
Track 2
;
1234123412341234
=
0305
101
193010877
?
Then, I will use this code to read those formats using a C# program.
protected void CardReader_OTC(object sender, EventArgs e)
{
bool CaretPresent = false;
bool EqualPresent = false;
CaretPresent = CardReader.Text.Contains("^");
EqualPresent = CardReader.Text.Contains("=");
if (CaretPresent)
{
string[] CardData = CardReader.Text.Split('^');
//B1234123412341234^CardUser/John^030510100000019301000000877000000?
PersonName.Text = FormatName(CardData[1]);
CardNumber.Text = FormatCardNumber(CardData[0]);
CardExpiration.Text = CardData[2].Substring(2, 2) + "/" + CardData[2].Substring(0, 2);
}
else if (EqualPresent)
{
string[] CardData = CardReader.Text.Split('=');
//1234123412341234=0305101193010877?
CardNumber.Text = FormatCardNumber(CardData[0]);
CardExpiration.Text = CardData[1].Substring(2, 2) + "/" + CardData[1].Substring(0, 2);
}
}
After all of my above code, I think I need to use ISO 8583 messaging protocol to send my data to bank.
My data will include
- Track 1 + Track 2 information.
- Money amount to withdraw for any kind of purchasing process.
I want 2 of these items to include at ISO message which I will send to the bank.
My questions are:
Is this correct business flow to interact with a bank? I would like to get any suggestions.
Is it possible to combine two of these items in a single ISO message, which will go to bank?
Please give me suggestions, any references, or any web links.