Giter VIP home page Giter VIP logo

Comments (11)

cavebring avatar cavebring commented on June 19, 2024 3

@scalpovich you could implement this:
https://www.npmjs.com/package/node-tlv

from iso-8583-socket-queue.

juks avatar juks commented on June 19, 2024

Hi!
What do you mean by "managing"? A callback function?

from iso-8583-socket-queue.

scalpovich avatar scalpovich commented on June 19, 2024

Hi,
Something like way to define each subfields as you implemented for ISO fields fields before packing the iso message .
Cause according to somes host specifications for VISA or others there as some subfields by each fields like fields 48, fields 55 etc...

from iso-8583-socket-queue.

juks avatar juks commented on June 19, 2024

Well, made an improvement.

Two new methods to mind:

  1. Before the whole packet is packed:
  2. Before each field is packed:
    beforePack: function(fieldValue) {

from iso-8583-socket-queue.

scalpovich avatar scalpovich commented on June 19, 2024

Hi igor.
thanks for your feedback.
I'm afraid to not understand your implementation.
Kindly provide an use case for exploitation. I mean an example for field 55

from iso-8583-socket-queue.

juks avatar juks commented on June 19, 2024

You should do like so for the field definition:

  '55': {
    length: 255,
    name:   'EMV Data',
    type:   'll-bin-char',
    alias:  '',
    beforePack: function(fieldValue) {
        // Work with tags (TLV) values here
        return fieldValue;
    }
  },

If your message has no field 55 and you want to add it explicitly, you may use the following code inbeforeBack method:

  beforePack: function(data) {
    data['55'] = Buffer.from('9f2608571f1e10d4fa4aac9f2701809f100706010a03a4b8029f37045bb074729f3602000c950500800010009a031508189c01009f02060000000010005f2a02064382023c009f1a0206439f03060000000000009f3303e0f0c89f34034403029f3501229f1e0835313230323831358407a00000000310109f41030000565f340101', 'hex');
    return data;
  }

from iso-8583-socket-queue.

scalpovich avatar scalpovich commented on June 19, 2024

Thank for your revert.
Something like this i it correct?

  '55': {
    length: 255,
    name:   'EMV Data',
    type:   'll-bin-char',
    alias:  '',
    beforePack: function(fieldValue) {
           '9F26': {
              length: 8,
              name:   'Application cryptogram',
              type:   'fixed-b',
               alias:  ''
               }
          return fieldValue;
       }
  },

from iso-8583-socket-queue.

juks avatar juks commented on June 19, 2024

Unfortunatelly, there is no tag layer abstraction inside the beforePack right now. So what you get there is entire field 55 value, that you need to break into parts and process on your own.

from iso-8583-socket-queue.

scalpovich avatar scalpovich commented on June 19, 2024

Ok i see
So what do you mean by

// Work with tags (TLV) values here

Some example

from iso-8583-socket-queue.

juks avatar juks commented on June 19, 2024

I mean you have fieldValue variable there, representing the field 55 value. So to alter the EMV tags you need to implement it in this method.

from iso-8583-socket-queue.

scalpovich avatar scalpovich commented on June 19, 2024

@cavebring thanks for the information.
I will take a look quickly

from iso-8583-socket-queue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.