How to pass calculation to payment field?