One customer was a debt collector that threatened to jail people if they didn't pay back loans that they never took out. Another was an offshore gambling operation that hid bets behind innocuous-sounding websites, including one dedicated to orange cats. A third was a phone-sex business catering to men with diaper fetishes or fantasies of raping women.

Ahmad "Andy" Khawaja made his fortune in online payment processing for a host of companies, providing a key conduit in e-commerce for "high risk" merchants by helping route customers' credit card purchases to banks. And recently Khawaja has shared that wealth in the form of multimillion-dollar political donations, first to Hillary Clinton and then to Donald Trump.

But thousands of internal company documents obtained by The Associated Press reveal that Khawaja's company, Allied Wallet Inc., has profited from guiding dubious businesses past the gates of the banking system. The records, which include email conversations as well as business and financial documents, show Allied Wallet executives helped deploy sham websites and dummy companies to hide these businesses' tracks, even in cases where Allied Wallet's own staff deemed the underlying business activities to be "very, very illegal."

The company's actions in these cases flout bank policies, credit card network rules and potentially US laws designed to prevent money laundering. In one instance, a company official complained to Khawaja that a colleague had provided "specific instructions on how to set up and operate an illegal gaming operation online."

Khawaja and a company lawyer didn't address a detailed list of questions from the AP about Allied Wallet's business, as well as Khawaja's political giving, for over a month.

This week the Los Angeles-based company's marketing director, A.J. Almeda, said in a statement that "any accusations of illicit or prohibited activities are misleading and categorically false." Almeda called the AP's line of inquiry "a political hit job due to the Allied Wallet's contribution to President Donald Trump's inauguration and support of his tax cut agenda."

The Lebanese-born Khawaja gave more than $4 million to Clinton's failed presidential campaign and other Democrats, then began extending his largesse to Republicans after a lunch with Republican fundraiser Elliott Broidy two weeks after Trump clinched the presidency.

Within days of that lunch, Khawaja met Trump at a $5,000-per-person transition fundraiser in Manhattan. Soon after he contributed $1 million to his inaugural committee, eventually earning himself a photo with the president inside the Oval Office.

The documents reviewed by the AP provide an unprecedented look behind the scenes of Khawaja's company, which claims to process billions of dollars a year in online transactions.

They also come against the backdrop of a previous run-in with federal authorities over processing illegal online gambling proceeds: In 2010, Khawaja and his company were forced to give up $13 million in a civil forfeiture stemming from a sprawling FBI probe into the online poker industry.

"The reason they had to forfeit the money was they were acting on behalf of an illegal gambling outfit," said Roy Pollitt, a former FBI special agent who worked the case. "Based upon the agreement that was made years ago, it's troubling to hear there might be similar behavior still occurring."

Allied Wallet's past hasn't stopped Washington from accepting Khawaja's political generosity.

In all, Khawaja, his company and its executives have contributed at least $6 million to politicians and political organizations since late 2015, according to an AP review of disclosure reports.

Since Trump's inauguration, the company and its executives have given nearly $1 million more to Republican candidates and committees, including $200,000 from Khawaja to Rep. Ron DeSantis, a Trump-backed candidate running for governor in Florida.

Donations to Democrats include nearly $2 million to the Democratic National Committee, along with a who's who of top candidates, including Missouri Sen. Claire McCaskill.

In June, the Senate minority leader, New York Democrat Chuck Schumer, appointed Khawaja as one of nine members on the US Commission on International Religious Freedom. In April, Charlie Kirk, the outspoken head of the pro-Trump super PAC Turning Point USA, touted Khawaja on Twitter as a beneficiary of Trump's tax plan.

Nobody in Washington, Democrat or Republican, appears to have questioned how Khawaja earned his money, and what exactly Khawaja might hope to gain from his political giving is not entirely clear. The records reviewed by the AP show that Khawaja has pursued foreign business deals, including an investment by a United Arab Emirates-controlled wealth fund, a prospective deal with an Iranian bank and a potential business arrangement with Lebanon. Some US senators he has supported are on the banking committee, which writes laws governing his industry.