'Render the payment and verification flow.
Arguments:
request (HttpRequest): The request object.
course_id (unicode): The ID of the course the user is trying
to enroll in.
Keyword Arguments:
always_show_payment (bool): If True, show the payment steps
even if the user has already paid.  This is useful
for users returning to the flow after paying.
current_step (string): The current step in the flow.
message (string): The messaging to display.
Returns:
HttpResponse
Raises:
Http404: The course does not exist or does not
have a verified mode.'

@method_decorator(login_required)
def get(self, request, course_id, always_show_payment=False, current_step=None, message=FIRST_TIME_VERIFY_MSG):

    course_key = CourseKey.from_string(course_id)
    course = modulestore().get_course(course_key)
    if (course is None):
        log.warn(u'Could    not    find    course    with    ID    %s.', course_id)
        raise Http404
    redirect_url = embargo_api.redirect_if_blocked(course_key, user=request.user, ip_address=get_ip(request), url=request.path)
    if redirect_url:
        return redirect(redirect_url)
    verification_deadline = VerificationDeadline.deadline_for_course(course.id)
    response = self._response_if_deadline_passed(course, self.VERIFICATION_DEADLINE, verification_deadline)
    if (response is not None):
        log.info(u"Verification    deadline    for    '%s'    has    passed.", course.id)
        return response
    relevant_course_mode = self._get_paid_mode(course_key)
    if (relevant_course_mode is not None):
        if CourseMode.is_verified_mode(relevant_course_mode):
            log.info(u"Entering    payment    and    verification    flow    for    user    '%s',    course    '%s',    with    current    step    '%s'.", request.user.id, course_id, current_step)
        else:
            log.info(u"Entering    payment    flow    for    user    '%s',    course    '%s',    with    current    step    '%s'", request.user.id, course_id, current_step)
    else:
        log.warn(u"No    paid/verified    course    mode    found    for    course    '%s'    for    verification/payment    flow    request", course_id)
        raise Http404
    user_is_trying_to_pay = (message in [self.FIRST_TIME_VERIFY_MSG, self.UPGRADE_MSG])
    if user_is_trying_to_pay:
        upgrade_deadline = relevant_course_mode.expiration_datetime
        response = self._response_if_deadline_passed(course, self.UPGRADE_DEADLINE, upgrade_deadline)
        if (response is not None):
            log.info(u"Upgrade    deadline    for    '%s'    has    passed.", course.id)
            return response
    already_verified = (self._check_already_verified(request.user) if CourseMode.is_verified_mode(relevant_course_mode) else True)
    (already_paid, is_enrolled) = self._check_enrollment(request.user, course_key)
    sku_to_use = relevant_course_mode.sku
    purchase_workflow = request.GET.get('purchase_workflow', 'single')
    if ((purchase_workflow == 'bulk') and relevant_course_mode.bulk_sku):
        sku_to_use = relevant_course_mode.bulk_sku
    redirect_response = self._redirect_if_necessary(message, already_verified, already_paid, is_enrolled, course_key, user_is_trying_to_pay, request.user, sku_to_use)
    if (redirect_response is not None):
        return redirect_response
    display_steps = self._display_steps(always_show_payment, already_verified, already_paid, relevant_course_mode)
    user_is_active = self._get_user_active_status(request.user)
    requirements = self._requirements(display_steps, user_is_active)
    if (current_step is None):
        current_step = display_steps[0]['name']
    if (request.GET.get('skip-first-step') and (current_step in self.SKIP_STEPS)):
        display_step_names = [step['name'] for step in display_steps]
        current_step_idx = display_step_names.index(current_step)
        if ((current_step_idx + 1) < len(display_steps)):
            current_step = display_steps[(current_step_idx + 1)]['name']
    courseware_url = ''
    if ((not course.start) or (course.start < datetime.datetime.today().replace(tzinfo=UTC))):
        courseware_url = reverse('course_root', kwargs={'course_id': unicode(course_key)})
    full_name = (request.user.profile.name if request.user.profile.name else '')
    contribution_amount = request.session.get('donation_for_course', {}).get(unicode(course_key), '')
    request.session['attempting_upgrade'] = (message == self.UPGRADE_MSG)
    verification_good_until = self._verification_valid_until(request.user)
    if relevant_course_mode.sku:
        processors = ecommerce_api_client(request.user).payment.processors.get()
    else:
        processors = [settings.CC_PROCESSOR_NAME]
    context = {'contribution_amount': contribution_amount, 'course': course, 'course_key': unicode(course_key), 'checkpoint_location': request.GET.get('checkpoint'), 'course_mode': relevant_course_mode, 'courseware_url': courseware_url, 'current_step': current_step, 'disable_courseware_js': True, 'display_steps': display_steps, 'is_active': json.dumps(user_is_active), 'user_email': request.user.email, 'message_key': message, 'platform_name': configuration_helpers.get_value('PLATFORM_NAME', settings.PLATFORM_NAME), 'processors': processors, 'requirements': requirements, 'user_full_name': full_name, 'verification_deadline': (verification_deadline or ''), 'already_verified': already_verified, 'verification_good_until': verification_good_until, 'capture_sound': staticfiles_storage.url('audio/camera_capture.wav'), 'nav_hidden': True, 'is_ab_testing': ('begin-flow' in request.path)}
    return render_to_response('verify_student/pay_and_verify.html', context)
