It depends on the seller. If the seller wants, they can collect the information from you and send it to the payment gateway. In that case, they of course have everything that you provide at some point. They are not supposed to keep the security code, and there are rules about keeping the credit card number safe.
The first four digits of the credit card number often indicate the bank, although smaller banks may share. But for example a Capital One card would indicate the bank.
Other sellers work through a payment gateway that collects the information. Even there, the seller may collect most of the information first and send it to the gateway. In particular, the seller may collect name, email, phone, and address information. And in general the gateway will reveal that kind of information. They will not give the seller credit card info other than the name on the card, expiration date, and possible last four digits. They may report if the address matches the card's billing address (mismatched addresses may mean fraud).
Buying through someone like PayPal can provide the least information. For a digital good, PayPal can only expose the buyer's name (which may be a business name) and email (associated with the payment account). However PayPal still has the other information and may expose it under legal action (e.g. if the credit card transaction is reversed or the good sold is illegal). And even PayPal will expose the shipping address for physical goods that require shipping.