Pass test for checkout
Refactoring and test all pass