The Jataka, Volume I, tr. by Robert Chalmers, , at sacred-texts.com
"The man ungrateful."--This story was told by the Master while at Jetavana, about Anātha-piṇḍika.
On the borders, so the tale goes, there lived a merchant, who was a correspondent and a friend of Anātha-piṇḍika's, but they had never met. There came a time when this merchant loaded five hundred carts with local produce and gave orders to the men in charge to go to the great merchant Anātha-piṇḍika, and barter the wares in his correspondent's shop for their value, and bring back the goods received in exchange. So they came to Sāvatthi, and found Anātha-piṇḍika. First making him a present, they told him their business. "You are welcome," said the great man, and ordered them to be lodged there and provided with money for their needs. After kindly enquiries after their master's health, he bartered their merchandise and gave them the goods in exchange. Then they went back to their own district, and reported what had happened.
Shortly afterwards, Anātha-piṇḍika similarly despatched five hundred carts with merchandise to the very district in which they dwelt; and his people, when they had got there, went, present in hand, to call upon the border merchant. "Where do you come from?" said he. "From Sāvatthi," replied they; "from your correspondent, Anātha-piṇḍika." "Anyone can call himself Anātha-piṇḍika," said he with a sneer; and taking their present, he bade them begone, giving them neither lodging nor douceur. So they bartered their goods for themselves and brought back the wares in exchange to Sāvatthi, with the story of the reception they had had.
Now it chanced  that this border merchant despatched another caravan of five hundred carts to Sāvatthi; and his people came with a present in their hands to wait upon Anātha-piṇḍika. But, as soon as Anātha-piṇḍika's people caught sight of them, they said, "Oh, we'll see, sir, that they are properly lodged, fed, and supplied with money for their needs." And they took the strangers outside the city and bade them unyoke their carts at a suitable spot, adding that rice and a douceur would come from Anātha-piṇḍika's house. About the middle watch of the night, having collected a baud of serving-men and slaves, they looted the whole caravan, carried off every garment the men had got, drove away their oxen, and took the wheels off the carts, leaving the latter but removing the wheels. Without so much as a shirt among the lot of them, the terrified strangers sped away and managed to reach their home on the border. Then Anātha-piṇḍika's people told him the whole story. "This capital story," said he, "shall be my gift to the Master to-day;" and away he went and told it to the Master.
"This is not the first time, sir," said the Master, "that this border merchant has shewn this disposition; he was just the same in days gone by." Then, at Anātha-piṇḍika's request, he told the following story of the past.
Once on a time when Brahmadatta was reigning in Benares, the Bodhisatta was a very wealthy merchant in that city. And he too had as a correspondent a border merchant whom he had never seen and all came to pass as above.
Being told by his people what they had done, he said, "This trouble is the result of their ingratitude for kindness shewn them." And he went on to instruct the assembled crowd in this stanza:--
[paragraph continues] After this wise did the Bodhisatta teach the truth in this stanza. After a life spent in charity and other good works, he passed away to fare according to his deserts.
 His lesson ended, the Master identified the Birth by saying, "The border merchant of to-day was the border merchant of those days also; and I was the merchant of Benares."