Ecommerce payment processor

When someone makes a purchase on my ecommerce site, I would like everything on the front end to look normal. On the back end however, I want one of two options to happen:
1) The customer spends money on their credit card for the goods > those funds are either sent directly to a crypto wallet that can hold fiat currency, or the funds are converted at market-value to bitcoin and the btc is sent to a wallet.
Or 2) On the front end it looks like any other ecommerce transaction to the customer but they are actually market-buying bitcoin (or another crypto) and the crypto automatically gets sent to my wallet.

Can this be done?