-
Notifications
You must be signed in to change notification settings - Fork 108
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
Use int64 for field.Numeric #292
Comments
Hi @alovak kindly assign this one to me, much appreciated! |
What is "Option 3" @alovak? Do you mean option 1? |
@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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
.The text was updated successfully, but these errors were encountered: