Target Corp. and Visa have settled a yearslong antitrust dispute accusing the card company of being part of an illegal anticompetitive scheme that forced merchants to pay excessive fees when customers pay with credit or debit cards, according to a stipulation filed Thursday in New York federal court.