Added beforeFilter for Merchant Section
Added some email template and refactor code in papi library