Added helper and test for purchase
Updated files