You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The mangopay sdk for java uses a native int to represent the value of an amount in cents.
Integers on the java platform are signed and stored on 32 bits resulting in a value range that can go from -2147483648 to 2147483647. This means that the maximum amount that can safely be represented for a mangopay transaction is 2 147 483 647 cents or 21 474 836.47€
While that number is large, it is within the scope of possible financial transactions that can happen in the real world.
Trying to call the mgp sdk with a value that exceeds that value leads to a silent integer overflow (the number is trucated and can resultin a negative number). This is quite hard to spot, there are no controls at all in the SDK that help the user know he triggered an overflow and it can result in either a payin with the wrong amount being created or a completely misleading error
{"Message":"One or several required parameters are missing or incorrect. An incorrect resource ID also raises this kind of error.","Type":"param_error","errors":{"DebitedFunds":"The value cannot be less than Fees"}}
The documentation on data formats does not mention a limit or a max amount, nor does the payin documentation. I haven´t checked the other transaction types documentation.
The text was updated successfully, but these errors were encountered:
The mangopay sdk for java uses a native
int
to represent the value of an amount in cents.Integers on the java platform are signed and stored on 32 bits resulting in a value range that can go from -2147483648 to 2147483647. This means that the maximum amount that can safely be represented for a mangopay transaction is 2 147 483 647 cents or 21 474 836.47€
While that number is large, it is within the scope of possible financial transactions that can happen in the real world.
Trying to call the mgp sdk with a value that exceeds that value leads to a silent integer overflow (the number is trucated and can resultin a negative number). This is quite hard to spot, there are no controls at all in the SDK that help the user know he triggered an overflow and it can result in either a payin with the wrong amount being created or a completely misleading error
The documentation on data formats does not mention a limit or a max amount, nor does the payin documentation. I haven´t checked the other transaction types documentation.
The text was updated successfully, but these errors were encountered: