iso-8583-socket-queue icon indicating copy to clipboard operation
iso-8583-socket-queue copied to clipboard

ascii data receive from POS client processing

Open scalpovich opened this issue 3 years ago • 3 comments

H Igor, Im facing an issue when using is SQ as server to accept POS transactions according to new logical i add. But all POS sends ASCII /utf8array encoded message to SQ. At my end why i convert using .toString('hex'), the result is different than the one i excpected.

here is the result after hex convertion 16030100FFFD010000FFFD030312607EFFFD3A5DFFFD46FFFDFFFD5A6A614DFFFDFFFD350E4CFFFD5EFFFD4F4D53FFFDFFFD3E6C68FFFD00002EFFFD2BFFFD2CFFFD2FFFFD3000FFFD00FFFDFFFD09FFFD0AFFFD13FFFD140033003900320038FFFD07FFFD1100FFFD00FFFD002F00350005000400FFFD01000064000B000403000102000A00340032000E000D0019000B000C00180009000A00160017000800060007001400150004000500120013000100020003000F00100011000D0020001E060106020603050105020503040104020403030103020303020102020203

Kindly assist

scalpovich avatar Oct 08 '21 11:10 scalpovich

Hi!

Which one do you expect?

You may refer to toString() method specification here: https://nodejs.org/api/buffer.html#buffer_buf_tostring_encoding_start_end

juks avatar Oct 15 '21 15:10 juks

Hi Igor; Thanks for your revert I expected some thing like this start by 49534f : 49534F30343237323932303035303030313130307234874128E08A03163437363133343030303030303030333530303030303030303030303030303135303032313039313631363530303030343436323130393136313635303436323231323039313635313031303135313431343430303131303135383132113031313031303030343030323437363133343030303030303030333544323231323230313134363135333139303030343436303030303030303131303130303930313130313030303430303430202024544553542050415820534557414341524420202020202020393532103030393930303030303001469F2608CC90AAF946C0D2EC9F2701809F100706010A03A498009F3704FF0830879F3602002B950580800080009A032109169C01009F02060000000015005F2A02095282021C009F1A0206869F03060000000000009F3303E0F8C88407A00000000310109F41030004459F0902008C9F34034103029F3501229F1E0830383230393733309F630830383230393733305F340101002930303037303030303130303032393337303030323130393039313431333937393938454643

scalpovich avatar Oct 15 '21 16:10 scalpovich

I suggest you debug your logic, dump the contents of your Buffer object and see how source data corresponds to what stored inside object and where it may get skewed.

juks avatar Oct 18 '21 14:10 juks