updated PayTest.java (integrated purchaseListener into observer)