Visa and Mastercard forge deal to end long-term dispute with merchants