Fixed same error in payment checkout
Use foreach instead of while for Model Collection