This problem is not solvable unless you want to place yourself at great personal risk. The trouble is that bitcoin transfers are inherently non-reversible, meaning that once you've transfered bitcoins there is absolutely nothing you can do to guarantee the return of those bitcoins. Credit cards however are highly reversible and most banks reserve the right to take back funds with very little justification and will almost always side with their customers (aka the people who are paying you.)
This means that if someone buys bitcoins from you with a credit card, and then removes the bitcoins from your sites wallet, and then they default on their credit card payment, the bank will ask you for the money back, and you will be out some bitcoins.
There are a few partial solutions to this problem. You can accept credit card payments but require the user to not remove the bitcoins untill the payment has become non-reversible. This is usually a prohibitive amount of time, taking anywhere from a month+ to clear. The fastest way to possibly transfer money in a non-reversible fashion would be either to use the SEPA network if you live in Europe, or if you live in the USA then you can use something called Automated Clearing House protocol, which was developed by the federal reserve to allow debiting of bank accounts. Both of these are quite difficult and annoying to implement.
Its impossible to buy bitcoins from yourself, because it implies that you have the bitcoins in the first place, and you cant offer a service that accepts credit cards for the reasons stated above, and other companies dont for the same reasons.