ISO8583dotnet 1.0.0
dotnet add package ISO8583dotnet --version 1.0.0
NuGet\Install-Package ISO8583dotnet -Version 1.0.0
<PackageReference Include="ISO8583dotnet" Version="1.0.0" />
paket add ISO8583dotnet --version 1.0.0
#r "nuget: ISO8583dotnet, 1.0.0"
// Install ISO8583dotnet as a Cake Addin #addin nuget:?package=ISO8583dotnet&version=1.0.0 // Install ISO8583dotnet as a Cake Tool #tool nuget:?package=ISO8583dotnet&version=1.0.0
ISO8583dotnet
ISO8583dotnet is a robust and extensible .NET library for parsing and handling ISO8583 messages, widely used in financial transaction systems like ATMs and POS devices.
Current Version: v1.0.0
Overview
ISO8583dotnet provides a seamless way to parse, interpret, and construct ISO8583 financial messages. Built to work with .NET 8 and above, the library integrates smoothly into your application, enabling you to process ISO8583 messages with minimal effort.
Key Features:
- Parse ISO8583 byte arrays into structured message objects.
- Convert structured messages back to byte arrays.
- Easy-to-use dependency injection for integration into .NET services.
- Extensive support for working with nested fields and their values.
Installation
Install the library via NuGet:
dotnet add package ISO8583dotnet
Visual Studio
- Right-click on your project in Solution Explorer.
- Select Manage NuGet Packages.
- Search for
ISO8583dotnet
and click Install.
Setup
Add the library to your application in Program.cs
:
using ISO8583Net;
builder.Services.AddISO8583Net();
Usage
Inject the IISO8583Parser
interface directly into your class constructor for Scoped Dependencies:
public class ISO8583Server
{
private readonly IISO8583Parser _iso8583Parser;
public ISO8583Server(IISO8583Parser iso8583Parser)
{
_iso8583Parser = iso8583Parser;
}
public byte[] ISO8583Test(byte[] isoMessageByte)
{
// parse the ISO8583 byte to readable message
var parsedMessage = _iso8583Parser.ParseIso8583ByteToMessage(isoMessageByte!);
// manipulate the ISO8583 message based on your business requirement
var response = _iso8583Parser.ParseIso8583MessageToByte(parsedMessage!);
return response;
}
}
For Singleton dependencies, we can create a scoped instance by using the ScopeFactory
:
public class ISO8583Server
{
private readonly IServiceScopeFactory _scopeFactory;
public ISO8583Server(IServiceScopeFactory scopeFactory)
{
_scopeFactory = scopeFactory;
}
public byte[] ISO8583Test(byte[] isoMessageByte)
{
// parse the ISO8583 byte to readable message
using var scope = _scopeFactory.CreateScope();
var iso8583Parser = scope.ServiceProvider.GetRequiredService<IISO8583Parser>();
// parse the ISO8583 byte to readable message
var parsedMessage = iso8583Parser.ParseIso8583ByteToMessage(isoMessageByte!);
// manipulate the ISO8583 message based on your business requirement
var response = iso8583Parser.ParseIso8583MessageToByte(parsedMessage!);
return response;
}
}
If you want to access the values of the ISO8583 message before packing, you can do that:
foreach (var field in parsedData
.Fields.Where(x => x.Value != null && !string.IsNullOrEmpty(x.Value.Value))
.Select(x => x.Value!))
{
if (field.InnerField.Count < 1)
Console.WriteLine($"{field.Name} --> {field.Value}");
else
{
foreach (var innerField in field
.InnerField.Where(q => q.Value != null && !string.IsNullOrEmpty(q.Value.Value))
.Select(x => x.Value!))
{
Console.WriteLine($"{innerField.Name} --> {innerField.Value}");
}
}
}
You can easily manipulate any ISO8583 message field:
if (parsedData.MessageType == "0100")
{
parsedData.Fields[39]!.SetValue("00");
}
else if (parsedData.MessageType == "0800")
{
parsedData.Fields[39]!.SetValue("00");
}
else
{
parsedData.Fields[39]!.SetValue("06");
}
Requirements
- .NET Version: .NET 8 or higher
- Dependencies: No external dependencies required
License
This library is provided under a Proprietary License.
You are free to use the library for any purpose, but modification or redistribution of the source code is not permitted. See the LICENSE.txt
file for more information.
Contributing
We currently do not accept external contributions as the library is proprietary. For feature requests or bug reports, please reach out to us.
Contact
For support or further inquiries, please reach out to:
- Email: odinakafocha@gmail.com
- NuGet Package: ISO8583dotnet
Acknowledgments
Thank you for using ISO8583dotnet!
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- Microsoft.AspNetCore.OpenApi (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 43 | 11/24/2024 |