Let's say my client sells a steel bar that would be cutted in customers needs. Customer could select length in 0.3 metric intervals and the per item price is 1 meter. Now sending this to Paytrail you need to make item.units as an integer which atleast would mess up the calculations in Paytrail's end, where amount must match with total sum of items.
Well I think this could be fixed meddling with the prices before sending, but why not item.units be a floating number?
Expected behaviour
The field item.units should be a floating point number?
Actual behaviour
According to the documents, field units must be integer for payment payload item. This wont work ideally for items that has fractions in items quantity.
Describe the bug
Document https://docs.paytrail.com/#/?id=item says that
item.units
should be ainteger
.Let's say my client sells a steel bar that would be cutted in customers needs. Customer could select length in 0.3 metric intervals and the per item price is 1 meter. Now sending this to Paytrail you need to make
item.units
as an integer which atleast would mess up the calculations in Paytrail's end, whereamount
must match with total sum of items.Well I think this could be fixed meddling with the prices before sending, but why not
item.units
be a floating number?Expected behaviour
The field
item.units
should be a floating point number?Actual behaviour
According to the documents, field
units
must beinteger
for payment payloaditem
. This wont work ideally for items that has fractions in items quantity.