refactor mark as paid on page page to use json ajax calls