The state Court of Appeals ruled in Albany, N.Y., Thursday, upholding a law that forces out-of-state online retailers to charge sales tax on purchases by New Yorkers.

The court decided 4-1 that the tax statute enacted in 2008 violates neither the commerce clause nor due process clauses of the federal Constitution.