adapt payment logic to suit any qty of steps in checkout