There are a lot of issues for handling credit cards. The easiest solution is using a service like Paypal's service to process the credit cards. That way, all you have to do is store the amount and a PayPal Transaction ID.
You can then start moving up to more complicated solutions, directly using gateways such as Verisign (yes, that's part of PayPal) or Authorize.net or any of a lot more.
Things that you will need to think about, especially if you start to go towards using merchant account APIs
- PCI Compliance
- Fraud protection
- Dispute handling
- Getting an Internet Merchant Account
- Storing/ Not storing/ encrypting personal identifiable information
It's a really broad topic, and there are a lot of answers out there. This is a bit of a start of things you'll have to think about.