President Donald Trump has blasted Amazon over the issue of sales-tax collection by online retailers.

Amazon says it collects sales taxes on its inventory in the 45 states that have such taxes.

The Trump Organization's online store collects the tax in just two states.

Online retailers are not legally required to collect the taxes unless they have a physical presence in the state.

One of President Donald Trump's most frequent attacks on Amazon involves the amount of state and local sales taxes he says the online retailer collects. But collecting such taxes is apparently something his own business' online store does in just two states.

Trumpstore.com, the Trump Organization's online retailer, collects sales taxes from purchasers who ship orders to Louisiana and Florida addresses, The Wall Street Journal reported.

Amazon, the e-commerce giant that has found itself in Trump's crosshairs this month, originally collected sales taxes in just five states. But the company has more recently moved to collect sales taxes on its inventory in the 45 states that have such taxes as well as Washington, DC. The White House has said Trump is referring to third-party sellers on the platform — not the company itself — when discussing the collection of sales taxes.

"Trumpstore.com has always, and will continue to collect, report, and remit sales taxes in jurisdictions where it has an obligation to do so," a Trump Organization representative told CNBC.

Amazon's collection of sales taxes in those 45 states is not required by law. Online retailers are obliged to collect the taxes only in states where they have a physical presence. The Supreme Court is hearing arguments in a case on the subject later this month after the Trump administration filed a brief with the high court in March. The administration argued that retailers like Amazon had to collect the tax in states where they do not have a physical location. A ruling in that case could affect the Trump Organization.

Trump has repeatedly targeted the sales-tax issue as a way to go after Amazon. In tweeting about the issue, Trump said "fully tax paying retailers are closing stores all over the country...not a level playing field!"

"Unlike others, they pay little or no taxes to state & local government," he said in another recent tweet, adding in a subsequent post that Amazon "must pay real costs (and taxes) now!"