def is_eligible_for_exam(mmtrack, course_run):
    """
    Returns True if user is eligible exam authorization process. For that the course must have exam
    settings and user must have paid for it.

    Args:
        mmtrack (dashboard.utils.MMTrack): a instance of all user information about a program.
        course_run (courses.models.CourseRun): A CourseRun object.

    Returns:
        bool: whether user is eligible or not
    """
    return course_run.has_future_exam and mmtrack.has_paid(course_run.edx_course_key)