In case you did not know, JoomlaThat offers an extension called Affiliate Tracker - a complete affiliate tracking tool for Joomla (track referrals & commission sales)
Best of all, they offer a plugin for K2Store.
Anyone using K2Store should check it out -
www.joomlathat.com/affiliate-tracker
And just in case, you don't know about K2Store - it's a simple shopping cart extension that integrates with K2, so that you can use K2 items to sell both physical and digital products -
www.k2store.org