How does Shopify get away with charging fees on a cancelled transation?

PayPal never charges fee on refund amount, and Shopify start to charge on refund and cancelled orders since last March or April