Recently, two pieces of legislation—namely the Credit CARD act and the Wall Street reform act—have dealt blows to the credit card industry’s near-term prospects. The former took effect this past February, and placed limits on the fees card issuers could charge on credit and debit card transactions. The latter, signed into law in July but unlikely to take effect until later this year, aims to make the byzantine U.S. financial system more transparent and accountable.  

It’s no surprise, then, that share prices of the industry’s major players have taken a serious hit in recent months. The country’s largest card issuers, including Bank of America (BAC - Free Analyst Report), Citigroup (C), JPMorgan Chase (JPM - Free Analyst Report), and Wells Fargo (WFC), have seen their stock values fall, on average, about 25% since April. And the carnage didn’t end there. Shares of Visa (V) and MasterCard (MA) are trading more than 20% below their respective 12-month peaks.

Investor concerns about the banking industry’s short-term prospects seem warranted, since its members derive the lion’s share of their revenues from consumer spending on mortgage loans and credit cards, two areas that have been under pressure lately. But unlike banks and charge card issuers such as American Express (AXP - Free Analyst Report), Visa and MasterCard have no direct credit exposure. That’s because neither company issues cards or extends credit, but instead builds and maintains a network that facilitates electronic payments in exchange for a nominal fee on each transaction.

Industrywide, debit card transactions are growing rapidly, while the credit card segment is shrinking slowly, which leads to an interesting tradeoff. On the one hand, while the fees generated on each transaction are relatively small, debit payments now outnumber those made on credit cards and currently account for a larger portion of revenues, since consumers are more likely to use debit for day-to-day purchases, such as groceries. In addition, debit payments are withdrawn directly from customer accounts, making them more secure and less prone to customer disputes.

But on the other hand, transaction fees on credit payments are more lucrative, since the cards are typically used for big-ticket items, such TVs and electronics. But many Americans, still a bit skittish about job security and the slower-than-expected recovery, are trying to get a better handle on their finances by shifting to debit cards from credit, a trend that should continue to benefit both Visa and MasterCard.

While the love affair between consumers and spending endures, with credit and debit cards stepping into the lead roles once played by cash and checks, a rift has started to form. Several of the industry’s latest innovations—including signature-less transactions and contactless payments—remain a hit with retailers such as The Home Depot (HD - Free Analyst Report), McDonald’s (MCD - Free Analyst Report), and Wal-Mart (WMT - Free Analyst Report), due to the speed gained at the checkout line, but have drawn the ire of consumer watchdogs. Among their claims: Some of the programs were hastily put in place, suffer from serious security deficiencies, and often shift the blame in cases of fraud to the system’s least-powerful stakeholders—consumers.

Eager to address those concerns and beef up its online security, Visa recently purchased CyberSource, a leading provider of risk management and fraud prevention solutions with clients including British Airways (BA), Facebook, and Google (GOOG). Acquiring its long-time collaborator should prove especially critical as Visa further penetrates Asia and Latin America, two of the company’s fastest-growing markets and areas where security and fraud prevention are key.

Perhaps more important, as more consumers shift their buying habits online, the move gives Visa more ammunition as it fights for market share in the virtual space against rivals such as MasterCard and eBay’s (EBAY) PayPal payment service. Moreover, by some estimates, electronic payments will account for nearly two-thirds of consumer transactions within the next three to five years, a market that may approach $9 trillion over that time frame.

Looking further out, both Visa and MasterCard hold substantial long-term upside potential at their current prices. Near-term challenges aside, both companies should benefit as the shift to electronic forms of payment continues, with special emphasis on debit cards.  In addition, Visa and MasterCard have the luxury of well-known brand names, nearly debt-free balance sheets, and proven business models with little direct operational risk. Further, their expanding presence in fast-growing markets such Asia, Latin America, and the Middle East provide a measure of protection from a downturn in any one region.