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 MoneyField is a CompositeField which contains two fields, a DropdownField/HiddenField/TextField for the currency and a NumberField for the Amount. The first is already created inside a buildCurrencyField() method. The amount Field is directly created inside the constructor.
I would suggest to move the generation of the Amount field into a method also. This makes the class more extensible.
My use case is that I wanted to store the Money as full integer instead decimal, like my (and the most other) payment provider does. So I had to replace the internal NumericField with my own.
Description
The
MoneyField
is aCompositeField
which contains two fields, a DropdownField/HiddenField/TextField for the currency and a NumberField for the Amount. The first is already created inside abuildCurrencyField()
method. The amount Field is directly created inside the constructor.I would suggest to move the generation of the Amount field into a method also. This makes the class more extensible.
My use case is that I wanted to store the Money as full integer instead decimal, like my (and the most other) payment provider does. So I had to replace the internal NumericField with my own.
Additional context or points of discussion
In this PR #11150 I already made that change.
Validations
PRs
The text was updated successfully, but these errors were encountered: