You are asking for way more than you can post on StackOverflow. In order to handle recurring charges, you will want to use a merchant services provider that offers recurring billing like authorize.net or Paypal Payments Pro. If you store the credit card information and try to handle the billing on your end you are asking for problems. Not only is it way more complicated, but you open yourself to liability issues related to storing credit card numbers. If the merchant services provider found out you are storing credit card numbers you would likely lose your account.
That said, there are a couple of recurring payment extensions already available for OpenCart that you could be able to install.
http://www.opencart.com/index.php?route=extension/extension&filter_search=recurring
There are probably more, but this what I found on the first search.