Branching logic for back button in total pay