This requires a payment gateway.
No operator or bank provides such service directly to the final consumer. There is always a gateway that is the intermediary.
Paypal, for example, offers Direct Payment. Valid only for business-type Paypal accounts located in the UK.
Nothing prevents you from negotiating directly with banks or directly with card operators. If you have the influence, the money, the time and the disposition, go ahead. But you probably won’t get anything because the market standard is to use the gateways for the purpose described in the question.
The first step would be to choose a gateway. After this follow the instructions of the chosen gateway. Some more modern gateways provide features where there is no need to send card data to your server and process it in the backend. But most are made that way, which makes security more delicate. At this point the ethical question is very much involved because a server administrator or the programmer who created and maintains the system and even the system owner may act in bad faith to steal data from the clients themselves.
In addition, such sites are preferred for hacker actions.
To reduce the weight on responasbility, do not store card data on your servers. Use it only for the transaction at the moment.
It is also very important to understand the standards of safety and ethics. For this see: https://www.pcisecuritystandards.org/
https://www.pcicomplianceguide.org/pci-faqs-2/
I do not think that card operators offer this type of service, the most correct thing would be to do with some representative I think Cielo is the easiest to deal with in this matter
– Leo Letto
Doing it by hand would be very complex... I recommend using integrations with transparent checkout, where payment is made on your site, without redirection. On account of that, you would bring to yourself perhaps many inconveniences with users and in case of card cloning, data theft and etc... The responsibility would fall on you, and not counting the marketing behind for example Pagseguro, people feel safer because of the Brand...
– LocalHost
In addition to the link above, you have this: It is possible to integrate payments into my system with banking institutions?
– Bacco
Dude, there is the script for payment with credit card ready and it’s pretty quiet to implement! On this link everything is ready and you will have to stay warm head. Take a look. Example working: https://datafacilinformatica.com.br/script-em-php-pay-up-credit cards/ https://www.datafacilinformatica.com.br/venda/script-script-integratedco-comcielo-php-ecommerce.php .
– evandro