Being Massachusetts though, although technically it should be legal since july, they haven't issued any permits to allow it to be sold. Those issues should be resolved with luck in another 2-3 years...
Being Massachusetts the licensing issues will be cleared up once the appropriate pockets are lined or once a relative of a state legislator starts trying to get a license, not a minute sooner or later.
Essentially, to the bank the debit card transactions look like they're coming from an ATM. That 'ATM' is owned by a wholly owned subsidiary of the dispensary that, IDK, ostensibly sells t shirts or something. Then the 'cash' out of the 'ATM' is immediately used in your transaction.
There's no way the banks involved don't know what's going on, but there's just enough plausible deniability that they're going with it for the moment. But all it takes is one dropping the hammer on one instance of this and everyone will be back to pure cash.