If you want to pay someone else, there are a bewildering array of ecommerce packages that do all kinds of snazzy things, but don't actually tell you if they support the simple "pay and download" system that you want. I spent ages looking and then decided that they all did far too much (shopping carts etc), so I opted to roll my own.
If you're happy to write some code, a "simple" approach is to go for a provider like Paypal and implement a basic IPN handler that releases a download when the transaction is complete. This is a can of worms - there's a huge learning curve and a lot of very poor (well, misleading) documentation/information on the net, but once you figure out how it works, it's all rather simple.
For example, with PayPal...
The Buy Now part is easy: PayPal's website will generate a button for you, you whack it in a form and bob's your uncle. This sets off the transaction, passes the user over to Paypal, takes their money, and then... by default sends you an email saying "please send this T-Shirt to this person now". Useless for immediae download! To release a download, you need to handle IPN (instant payment notification) to react to the transaction being completed. Read carefully the information on IPN and PDT. IPN comes back to your website in a different session and is a complete pig to connect up to the user's session (unless they have logged in to an account you have set up in a database, which I'm sure you're trying to avoid). PDT allows you to get at the relevant information when the user returns to your website (perfect) but has the down side that if the user forgets to return to your website, they get nothing for their money (argh!). So you ideally need to implement IPN (with a database-supported session) or IPN+PDT to be sure the user will get what they bought.
Paypal has a sandbox, so you can set up your website to use this and buy/sell as much as you need to test your code without spending any real money.
The main gotchas I discovered: Certain options on PayPal have unexpected side effects... e.g. if you ask for customers to be automatically returned to your website, then the data that Paypal sends you changes radically, and all your carefully crafted code falls apart. Also, there is a "custom" field in the initial form which allows you to send 200 characters of data to paypal, and this is returned to you in the IPN/PDT information - ideal for keeping a session alive across the transaction.