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

Expiratin date in track1 and track2 allows only YYMM #154

Closed Scratch-net closed 2 years ago

Scratch-net commented 2 years ago

It is hardcoded in Track1 and Track2 that the expiration date format is YYMM while it can be the other way around. Could this format be made configurable?

adamdecaf commented 2 years ago

@Scratch-net I don't see validation for expiration date to require that. I do see it specified as an alpha string in the example. Do you need help with this?

https://github.com/moov-io/iso8583/blob/master/specs/spec87ascii.go#L106

Scratch-net commented 2 years ago

Actually, it was my mistake, sorry. When calculating CVC you can choose MMYY or YYMM but in the track itself it's mandatory YYMM, I didn't know that. Thanks for the great library!