Small refactoring for payment observer.