get purchase working correctly