Added successful purchase handling (with local tests)