added payment sql on post payment function