Refactor cash and charge transaction into a class