It was a pleasure DOING business with you...or it was a pleasure TO DO business with you? Is it one of these wrong and why or are they both oK. Thank you for your help.
The idiomatic expression "a pleasure doing business" has become more and more common in recent decades as shown in Ngram. Both expressions are correct.
Both expressions are correct, but the "doing" one carries a slight expectation that the "business" will be ongoing, the current transactions merely current transactions. Whereas the "to do" form is completely neutral in tone and ever so slightly more formal, with no expectation of anything in the future.