refactor payment logger handler a little to import model when required