integrated purchaseListener into the purchaseObserver