moved params from payments to model and added error catching to payments