How to update payment status to database?