refactor payment system to not use websockets