fixing generate-invoice & payment process