A payment gateway protects the sensitive payment data using data encryption. The gateway follows several strict procedures for securing data that are defined by the PCI-DSS compliance. There are other security protocols payment gateways use as well, including tokenization and 3DS2.