Visa, the world's biggest payment network, will continue handling firearms purchases that newer digital platforms have shunned, even after two mass shootings in the past weekend.

“If we start to get in the mode of being legislators, it’s a very slippery slope,” Visa CEO Alfred Kelly told CNBC in an interview. “We shouldn’t be determining what’s right or wrong in terms of people’s purchases.”

The same principle would apply to a 32-ounce soda or birth control prescriptions, he added “The reality is that we are in the business of facilitating commerce,” Kelly said. “Legislators are in the business of deciding what the laws of the land are.”

While Visa will follow the laws on the books, Kelly placed the onus on lawmakers to make “commonsense changes” to federal gun rules such as addressing mental health issues, the capacity of magazines, and the types of firearms available to consumers. "Legislators need to do their job," he said.

U.S. companies have come under mounting pressure to sever ties with the firearms industry after massacres in El Paso, Texas, and Dayton, Ohio. Twenty-two people were killed and 24 were wounded in El Paso on Saturday when a gunman opened fire at a Walmart there, and nine were killed and 27 injured in an entertainment district in Dayton.

Payment processors Paypal, Square, Apple Pay, and Stripe blocked the use of their services for firearms purchases several years ago. But Ajay Banga, the head of Visa's longtime rival, Mastercard, said in May it isn't the processor's place to restrict gun purchases.

“The idea that somehow a few people can decide what the rest of society should be allowed to do, or not, even if it’s currently legal, I find that an interesting conundrum to discuss,” he said at the time. “Should I allow cards to be used to buy cigarettes? What about alcohol? What about contraceptive devices? Where would you like the line to be drawn, based on whose interpretation of what’s acceptable and not?”

Walmart, too, has come under scrutiny for continuing to sell guns and ammunition in its stores, though the company said it isn't changing its policies right now. The retail giant does not sell handguns and assault-style rifles. Following the shooting at a high school in Parkland, Florida, last year, Walmart also raised its minimum purchasing age for firearms to 21.