I've been purchasing used Apple computers for over 25 years (for my own use, my families use, and to add to my collection).
One of my very important rules is always (if reasonably possible) test the computer BEFORE handing over any sort of payment.
* If purchasing via eBay you can always return the computer if there is an issue.
* If buying locally (via Craigs List for example)...and it's a desktop computer...what I usually do is meet at the sellers home (and for safety)...always bring a 2nd person with a cellphone handy in case of emergency. But if things still seem "sketchy"/unsafe...then I skip it.
* If buying locally...and it's a portable computer...then I always meet at a coffee shop, McDonald's, or some other very public place (could even meet in front of the local Police Station).
Then I ALWAYS ALWAYS ALWAYS...test the portable computer before handing over payment..since it has a battery & doesn't need to be plugged in to test. I always reboot the computer to test if any passwords need to be entered...and I always check for any Apple ID, iCloud, or any other accounts that could make the computer non-useable to a new owner.
AND (if possible)...when I meet with the seller at a public place...I try to take a photo of the persons face...and a photo of their cars license plate. Many times this information is not needed...but always good too have in case there's an issue.
Here's a good "Buying a used Apple computer" link:
You can save money with a refurbished Mac laptop. Here's a guide on how to buy used machines, and how to avoid getting swindled.
www.zdnet.com
Here's Apple's info regarding what to do before selling an Apple computer:
Reset your Mac to factory settings to prepare it for a new owner.
support.apple.com
Very sorry the OP experienced this issue. In the 25+ years I've been buying (and occasionally selling) used Apple computers...most transactions go smoothly...and most sellers are honest & legit.
But there will always be the 1% (or less) folks that will try to do something dishonest. Being as careful as possible when conducting any used computer transaction is your best defense!
Nick