Hook up edit function to purchases service