I havent personally had any problems with pet store fish around here, petco, pet club, petsmart ect. So I think you maybe just got a sick fish or maybe didnt do somthing correct(dont get mad just an assumption).
As far as buying a fish online, iv been thinking about it, I found a few sites by searching through google, or you can even go through ebay, it seems alot of people are putting them on ebay now. I know shipping is alot of $$$$ though around $50-$60 depending on how far away you are from the place with the fish.
Iv heard good about getting them shipped though. I havent heard too many stories of fish dying on the trip over, and if it does happen the breeders have a live fish policy NORMALLY in which if you send them a pic of the dead fish or send it back, they will send you another live one of your choice or refund you.
Hope this helps.