Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request #121

Open
branewyn opened this issue May 9, 2022 · 3 comments
Open

Feature Request #121

branewyn opened this issue May 9, 2022 · 3 comments
Assignees

Comments

@branewyn
Copy link

branewyn commented May 9, 2022

Hi. First off. this is an awesome library. thank you very much for you hard work on this. it is amazing.

i would like to log 4 feature requests. i believe it would help quite a bit with the library.
the first would be to initialize the ISOPack library with a buffer. the current solution only allows it to be created via JSON as per your basic usage example.
the current way i use this is as per below

  const jsonData = new iso8583().getIsoJSON(bufferData);
  const isopack = new iso8583(jsonData);

this would allow me to perform functions on the message

the second request would be to set fields to whatever i want. the current use case i have would be for example to set the response code. i have copied your attachTimeStamp function and updated the magic sauce to below.

this.Msg['39'] = code

it would be useful to do this with other fields as well.

the third request would be to show the contents of a specific field. i have added the below function to do that.

getField(field) {
    if (this.Msg[field]) return this.Msg[field]
    else return T.toErrorObject(['field not defined in message']);
  }

the last request would be to decode 127.22
this is a postilion specific request. the field works much like 127.25

@zemuldo zemuldo self-assigned this Jul 6, 2022
@zemuldo
Copy link
Owner

zemuldo commented Jul 6, 2022

@branewyn great features. I would be happy to work together on this one :)

@branewyn
Copy link
Author

branewyn commented Jul 6, 2022

Yay. Great news. I would definitely be happy to share my code/enhancements that i have done that you could perhaps add to the library.
I would definitely need help with the 127.22 request however as i am still new in trying to decode xml.

If possible i can also share my thus far implementation of your library which would make it easier to handle incoming requests based on the message type and the code can then be enhanced to do whatever you like with it.
Not planning on building a switch with it. But am planning to build a library that can handle postbridge calls

@zemuldo
Copy link
Owner

zemuldo commented Jul 6, 2022

Awesome, push a branch any time and am happy to checkout and contribute then you push a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants