Closed alovak closed 8 months ago
Hi @alovak kindly assign this one to me, much appreciated!
What is "Option 3" @alovak? Do you mean option 1? Thanks for the help @GalihFajar!
@GalihFajar, please join Moov's community Slack here: https://slack.moov.io/ and we can discuss any questions you have in #iso8583 channel as well.
closed by @GalihFajar in #294
In most of the iso8583 specs, amount fields are 12 digits. Currently,
field.Numerc
is storing value asint
, which is max2147483647
(and it's 10 digits). We should useint64
instead ofint
.There are some options for fixing this:
field.Numeric
from int toint64
- a breaking changefield.BigNumeric
😂 which will acceptint64
- looks like an extra complexityI believe that option 1 is the right one as currently using
int
for amount fields is a bug and should be fixed. While it's not a backward-compatible change, it fixes the issue and requires a simple upgrade.P.S. this change should also support
int64
(and*int64
) in Marshal/Unmarshal in thefield.String
andfield.Numeric
.