Only increase affiliate earnings when referral is marked as paid. Close #224