How to pass calculated value to payment field