How to calculate total payment collected from a form