It's best not to completely rely on being able to use your credit card when shopping in Morocco. Some large, tourist-friendly shops, especially the carpet emporiums, will have the necessary equipment, but when paying for smaller purchases, cash will be the only form of payment accepted.