-1

I trying to create an ISO 8583 message using openiso8583 library

It was not having the field no 17 (Date, capture) so i need to extend the class. There is reference at the wiki page for extending a message

https://code.google.com/p/openiso8583net/wiki/ExtendingIso8583

Protected Overrides Function CreateField(fieldid As Integer) As IField
    If fieldid = 17 Then
        Return New Field(fieldid, New Field(fieldid, New FieldDescriptor(4, FieldValidator.FieldValidators.Numeric, Formatter.Formatters.Bcd,adjuster)
    Else
        Return MyBase.CreateField(fieldid)
    End If
End Function

1 Answers1

0

Try to add the iso field 17 in your template.

For example in iso8583.cs

  1. In public class Bit add public const int _017_CAPTURE_DATE = 17;
  2. In GetDefaultIso8583Template() add { Bit._017_CAPTURE_DATE, FieldDescriptor.AsciiFixed(4, FieldValidators.N) },

By this way the class iso8583 supports field 17.