Other than these high-end places, Morocco is a largely cash-based society and it's advisable to carry cash with you most of the time for purchases. If you do decide to use your debit or credit card in Morocco, make sure your bank knows that you're planning a trip. If not, they may block your cards.
How far does dollar go in Morocco?
The Moroccan dirham is the official currency of the country and 1 US Dollar is approximately equivalent to 10 Dirham.