Check all coupon that use the same code

Instead of just checking the first code and failing if it doesn't work,
check all codes until we find the first that works.