calculating payment value, form not returning correct amount