Calculate the total value and pass it to the payment field