You are happy owner of macbook with new os and dream to play favorite new games via Steam or old-school via emulators... And in one day you checked Amazon and WOW - PS gamepad copy only for 12$?! Awesome! "Shut up and take my money!"© You aren't stupid and googled first, that macOS supports ps gamepads from scratch - Double-Awesome!
And here is that day - you opened gamepad box and followed instruction https://theultralinx.com/2014/02/connect-playstation-3-controller-mac-os-mavericks/ or http://osxdaily.com/2014/12/28/connect-playstation-3-controller-mac-os-x/ But... NOTHINK WORKS!!! Oh my god! Is your controller is a fake?! PATIENCE!