Introduction
BIM-ISO8583.NET is a .NET library that allows developers to parse and create ISO8583 messages.
This library was released to help financial system developers to fully comply with ISO 8583 protocol's standard and make development fast and easy.
Background
The program method and technique used in this library were developed by Bim Garcia. He aims to establish a
significant contribution for the enhancement and advancement of the present technology specifically in the financial industry.
Using the Library
Here's how to use the library:
- Download full source code of library (click here to download)
- Use the codes below.
Create an ISO8583 message:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BIM_ISO8583;
namespace Sample_ISO8583_Message_Builder
{
class Program
{
static void Main(string[] args)
{
string MTI = "0200";
string PAN ="60197105032103634";
string ProCode= "001000";
string Amount ="15075";
string DateTime ="0429104720";
string STAN ="456";
string TID="44449999";
string POSEM = "02";
BIM_ISO8583.NET.ISO8583 iso8583 = new BIM_ISO8583.NET.ISO8583();
string[] DE = new string[130];
DE[2] = PAN;
DE[3] = ProCode;
DE[4] = Amount;
DE[7] = DateTime;
DE[11] = STAN;
DE[22] = POSEM;
DE[41] = TID;
string NewISOmsg= iso8583.Build(DE, MTI);
Console.WriteLine("Build ISO8583 Message");
Console.WriteLine("Output:");
Console.WriteLine( NewISOmsg);
Console.ReadLine();
}
}
}
Parse an ISO8583 message:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BIM_ISO8583;
namespace Parser
{
class Program
{
static void Main(string[] args)
{
BIM_ISO8583.NET.ISO8583 iso8583 = new BIM_ISO8583.NET.ISO8583();
string ISO8583Message = "0200722004000080000016601971" +
"0503210346001000000000015075042910472000045600244449999";
string[] DE;
DE = iso8583.Parse(ISO8583Message);
string PrimaryBitMap = DE[0];
string SecondaryBitMap = DE[1];
string PAN = DE[2];
string ProcessingCode = DE[3];
string Amount = DE[4];
string TransmissionTime = DE[7];
string SystemTraceNo = DE[11];
string TerminalID = DE[41];
string MerchantID = DE[42];
string AdditionalData = DE[48];
string MTI = DE[129];
Console.WriteLine();
Console.WriteLine("Please Press 'ENTER' to continue...");
Console.ReadLine();
Console.WriteLine(" PrimaryBitMap = DE[0]" + " = {0}", DE[0]);
Console.WriteLine(" SecondaryBitMap = DE[1]" + "= {0}", DE[1]);
Console.WriteLine(" PAN = DE[2]" + "= {0}", DE[2]);
Console.WriteLine(" ProcessingCode = DE[3]" + "= {0}", DE[3]);
Console.WriteLine(" Amount = DE[4]" + "= {0}", DE[4]);
Console.WriteLine(" TransmissionTime = DE[7]" + "= {0}", DE[7]);
Console.WriteLine(" SystemTraceNo = DE[11]" + "= {0}", DE[11]);
Console.WriteLine(" TerminalID = DE[41]" + "= {0}", DE[41]);
Console.WriteLine(" MerchantID = DE[42]" + "= {0}", DE[42]);
Console.WriteLine(" AdditionalData = DE[48]" + "= {0}", DE[48]);
Console.Read();
}
}
}