I'm researching a business idea based around, allowing authors to sell ebooks from a website.

What would be the best way to set that up? i'e tech wise? could it be done with wordpress? or would it need dedicated web programming? or are there templates already out there for such a service?

Thanks for any help.