The store had everything ready for you and it's not there fault that your membership number did not work. You also say you went at lunchtime which is when most manager go to eat but the individual at the counter did get you checkout with your discount so why are you complaining about the store. They followed proper procedures and called corporate to verify you are a member!
I agree with the membership problem on getting you a card. Good Sam use to give out a temporary card that was good for 30 days when you first joined up maybe they need to go back to that system since it usually takes at least 30 days for corporate to send off a new card!