'Returns the User Payment information.'

def get_payment_info(self, user, course_id):

    course_enrollment = CourseEnrollment.get_enrollment(user=user, course_key=course_id)
    paid_course_reg_item = PaidCourseRegistration.get_course_item_for_user_enrollment(user=user, course_id=course_id, course_enrollment=course_enrollment)
    payment_data = collections.OrderedDict()
    if (paid_course_reg_item is not None):
        coupon_redemption = CouponRedemption.objects.select_related('coupon').filter(order_id=paid_course_reg_item.order_id)
        coupon_codes = [redemption.coupon.code for redemption in coupon_redemption]
        coupon_codes = ',    '.join(coupon_codes)
        registration_code_used = 'N/A'
        list_price = paid_course_reg_item.get_list_price()
        payment_amount = paid_course_reg_item.unit_cost
        coupon_codes_used = coupon_codes
        payment_status = paid_course_reg_item.status
        transaction_reference_number = paid_course_reg_item.order_id
    else:
        registration_code_redemption = RegistrationCodeRedemption.registration_code_used_for_enrollment(course_enrollment)
        if (registration_code_redemption is not None):
            registration_code = registration_code_redemption.registration_code
            registration_code_used = registration_code.code
            if registration_code.invoice_item_id:
                (list_price, payment_amount, payment_status, transaction_reference_number) = self._get_invoice_data(registration_code_redemption)
                coupon_codes_used = 'N/A'
            elif registration_code_redemption.registration_code.order_id:
                (list_price, payment_amount, coupon_codes_used, payment_status, transaction_reference_number) = self._get_order_data(registration_code_redemption, course_id)
            else:
                list_price = 'N/A'
                payment_amount = 'N/A'
                coupon_codes_used = 'N/A'
                registration_code_used = 'N/A'
                payment_status = _('Data    Integrity    Error')
                transaction_reference_number = 'N/A'
        else:
            list_price = 'N/A'
            payment_amount = 'N/A'
            coupon_codes_used = 'N/A'
            registration_code_used = 'N/A'
            payment_status = _('TBD')
            transaction_reference_number = 'N/A'
    payment_data['List    Price'] = list_price
    payment_data['Payment    Amount'] = payment_amount
    payment_data['Coupon    Codes    Used'] = coupon_codes_used
    payment_data['Registration    Code    Used'] = registration_code_used
    payment_data['Payment    Status'] = payment_status
    payment_data['Transaction    Reference    Number'] = transaction_reference_number
    return payment_data
