moov-io / iso8583

A golang implementation to marshal and unmarshal iso8583 message.
https://moov.io
Apache License 2.0
349 stars 103 forks source link

Doubt about JCB binary message assembly #136

Closed Juniornewxt closed 2 years ago

Juniornewxt commented 2 years ago

Hello friends, I have a problem here, with messages from JCB, I would like to specify a message in the following format below?

Bit 33 Length: 1 binary byte, then up to 11 digits (maximum of 7 bytes) Format: LLVAR binary, numeric 4-bit BCD (unsigned, packed)

If yes, can you send me an example? I've tried it in several ways without success.

Tks friends.

alovak commented 2 years ago

I think it should look something like this when you define the spec:

        33: field.NewString(&field.Spec{
            Length:      11,
            Description: "Forwarding Institution Identification Code",
            Enc:         encoding.BCD,
            Pref:        prefix.BCD.LL,
        }),
alovak commented 2 years ago

If it does not work, maybe it's the issue related to this one?

Juniornewxt commented 2 years ago

@alovak

It was the first thing I tried unsuccessfully, I'm not in front of the correct computer, so you get evidence of the error.

Juniornewxt commented 2 years ago

I think my problem is the same

132

alovak commented 2 years ago

@Juniornewxt the issue with BCD encoding was fixed. Please, update iso8583 package to v0.6.8 version and check if your issue was solved. Let me know the result.

Juniornewxt commented 2 years ago

Hi friends, it didn't work for me, I seem to load the first 4 records and discard the rest.

But I won't worry about that because I'm not able to focus on configuring the JCB message, as I have other more important brands to mount, I'm going to close this call.

Juniornewxt commented 2 years ago

I don't want to disturb you, sorry

alovak commented 2 years ago

Hey @Juniornewxt ! Was it solved by #132 ? Asking to see if I can close the issue or it needs some work.

Juniornewxt commented 2 years ago

you can close it

tks