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

add '0' to first field 24 #3

Open
ehsansis0 opened this issue May 26, 2017 · 0 comments
Open

add '0' to first field 24 #3

ehsansis0 opened this issue May 26, 2017 · 0 comments
Assignees

Comments

@ehsansis0
Copy link

ehsansis0 commented May 26, 2017

hi

i don't know why automatically add 0 to first field 24 value?
when i set field 0 with 0420, 24 with 052 return value is 04200000010000000000052 that this value invalid. because field 24 is 052 but on returned value is 0052. i tested above data with jpos.

Ocsr value: 042000000100000000000052
Jpos valuse: 04200000010000000000052

my test source:

    DL_ISO8583_HANDLER isoHandler;
    DL_ISO8583_MSG     isoMsg;
    DL_UINT8           packBuf[1000];
    DL_UINT16          packedSize;

    DL_ISO8583_DEFS_1987_GetHandler(&isoHandler);
    DL_ISO8583_MSG_Init(NULL,0,&isoMsg);

    QByteArray qb("052");
    DL_ISO8583_MSG_SetField_Str(0,(const DL_UINT8*) "0420",&isoMsg);
    DL_ISO8583_MSG_SetField_Bin(24,(const DL_UINT8*) qb.data(),qb.length(),&isoMsg);

    DL_ISO8583_MSG_Dump(stdout,NULL,&isoHandler,&isoMsg);
    DL_OUTPUT_Hex(stdout,NULL,packBuf,packedSize);
    QByteArray array((char*)packBuf, packedSize);
    qDebug()<<array.toHex().data();

Best Regards
Ehsan Farahani Asil

@sabit sabit self-assigned this Oct 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants