adelosa / cardutil

Payment cards tools including ISO8583 parser and Mastercard IPM files processing
MIT License
25 stars 4 forks source link

CLI mci_csv_to_ipm - Drop empty PDS fields #13

Closed kirk-daries closed 1 year ago

kirk-daries commented 1 year ago

Hi there,

We are busy using the Mastercard Clearing Simulator as part of the clearing certification and one of the warnings we keep seeing is that certain records are flagged as 'invalid' because we did not specify any data in them.

i.e. PDS0184 is not present for Moto transactions. However other records contains this field.. so we can't 'drop' the usage completely (3DS records).

Is this a bug/incorrect usage on our side? or something we can improve upon on cardUtil?

Thanks

adelosa commented 1 year ago

I assume you are generating an IPM file from a csv. And the PDS field is present in the csv file but some records don't need this PDS value. Is Cardutil adding the pds field with no value?

kirk-daries commented 1 year ago

Apologies, I should have given you more context. I am indeed calling the mci_csv_to_ipm utility.

The csv file contains headers for the PDS fields but certain cells for some rows are 'empty' / not populated.

And yes, from the output i'm seeing on the Clearing Simulator, it appears as if the fields are always added but the length value is zero.

kirk-daries commented 1 year ago

cardUtil zero length warning

Feedback from the Simulator we are seeing. I'm unsure if this is purely a Simulator problem only at this point. I've reached out on mastercard end for comment.

kirk-daries commented 1 year ago

Feedback from Mastercard.

image

Can you confirm this is indeed a problem currently? Or is there something i can do on the CSV generation side?

adelosa commented 1 year ago

This should be fairly easy to fix so that if a field is empty, it is dropped from the message and avoids this error.

adelosa commented 1 year ago

I have just pushed v0.6.3 which have updated CSV to IPM tool to remove blank PDS fields from the IPM file. Let me know if this resolves your issue.

kirk-daries commented 1 year ago

Confirmed! This is now resolved! Thank you very much @adelosa !