Refactoring BuyActivity.