Closed timgabets closed 6 years ago
This is an awesome idea. just loop me where u feel like. it makes tatal sense for somebody to define their formats.
On Dec 20, 2017 6:08 PM, "Tim Gabets" notifications@github.com wrote:
As we all know, there are tons of different flavours of ISO8583, but currently, the format specification is harcoded in formats.js https://github.com/zemuldo/iso_8583/blob/master/lib/formats.js
I think it would be generally a good idea to implement a user-defined ISO8583 customizations support in the library. Probably, from the user's point of view it may look like this:
// Create the new ISO8583 format, which will be exact the same // as the default one from lib/formats.js, // but with the different DE12 (n6 type changed to n12):let format = { 12: { ContentType: "n", Label: "Time, local transaction (hhmmss)", LenType: "fixed", MaxLen: 12 }, }let isopack = new iso8583(data, format);
I think this will make the library more flexible and customizable.
Any thoughts/ideas are welcome ;)
If you are okay with that, I'll start the development soon.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/zemuldo/iso_8583/issues/8, or mute the thread https://github.com/notifications/unsubscribe-auth/ATB9ZS2zvmg_EH9zWOVg27iTynCcHiGOks5tCSLVgaJpZM4RIhZt .
Are you guys working on this idea? Is this available on a branch or on a repository I can take a look at?
@pablomarambio I am working on this. It will be available in the update coming end week.
@pablomarambio Hi, I have published a new version that supports this. I worked directly on master coz of time. Check it out
@zemuldo thanks! will do
@timgabets Have u checked the custom iso formats?
@timgabets @pablomarambio Am closing this issue coz i believe it has been resolved
@zemuldo Hi I think the issue is still there following is my code. I think it is specific to Bitmap. When I try to change ContentType from 'b' to 'an' it does not effect.
let customFormats = {
'1': {
ContentType: 'an',
Label: 'Bitmap',
LenType: 'fixed',
MaxLen: 8
}
};
const isopack = new iso8583(data, customFormats);
@kunalkaskar I would recommend you open another issue so that we better understand and solve your issue together.
As we all know, there are tons of different flavours of ISO8583, but currently the format specification is harcoded in formats.js
I think it would be generally a good idea to implement a user-defined ISO8583 customizations support in the library. Probably, from the user's point of view it may look like this:
I think this will make the library more flexible and customizable.
Any thoughts/ideas are welcome ;)
If you are okay with that, I'll start the development soon.