Kusal Mendis knocked a solid half century and medium pacer Dasun Shanaka grabbed three wickets as Sri Lanka beat Pakistan by eight wickets in the third and final T20I on Tuesday.