NEW YORK (AP) — Visa Inc. said its adjusted third-quarter profits rose by nearly double digits, as the global payments company continues to benefit from the broad shift by consumers to using credit and debit cards instead of cash.

The company said Tuesday that it earned a profit of $4.2 billion, or $2 a share, in its fiscal third quarter compared with a profit of $3.4 billion, or $1.60 a share, in the same period a year earlier. Last year’s results included a $456 million legal expense. Excluding that one-time cost, Visa’s adjusted profits rose 7% from a year earlier.

Visa said its payments volume rose 9% from a year earlier, while the number of processed transactions on Visa’s network increased 10% from a year earlier. Visa gets a fee from merchants and businesses who use its payment network to process transactions, so Visa’s profits rise and fall with the global economy as well as customers choosing to use a Visa debit or credit card over its competition or cash.

Roughly $3.799 trillion was processed on Visa’s network last quarter, with the biggest growth coming from Central and Eastern Europe, the Middle East and Latin America. In the U.S., which accounts for roughly half of Visa’s global payments volume, the number of payments rose 4.9%.