How to make a calculation and pass it to a payment field.