Declare get_merchant_account() stable and set security definer and allow www-data to call function