completing checkout functionality