checkout with diff cards, refactoring