It’s not easy to get Moroccan Dirham outside the country as it is a closed currency. Those who succeeded have paid heavy commissions for banks. There are ATMs everywhere in the country, exchange points, banks, and many businesses/shops/restaurants nowadays accept cards mostly with a 5% transaction fee.