Commit bc64c668 by Ahsan Ulhaq

Refund Policy on Prof Ed Receipts

ECOM-2562
parent a7e21bf1
...@@ -1419,6 +1419,12 @@ class CourseEnrollment(models.Model): ...@@ -1419,6 +1419,12 @@ class CourseEnrollment(models.Model):
""" """
return CourseMode.is_verified_slug(self.mode) return CourseMode.is_verified_slug(self.mode)
def is_professional_enrollment(self):
"""
Check the course enrollment mode is professional or not
"""
return CourseMode.is_professional_slug(self.mode)
@classmethod @classmethod
def is_enrolled_as_verified(cls, user, course_key): def is_enrolled_as_verified(cls, user, course_key):
""" """
......
...@@ -1984,7 +1984,10 @@ class CertificateItem(OrderItem): ...@@ -1984,7 +1984,10 @@ class CertificateItem(OrderItem):
def additional_instruction_text(self): def additional_instruction_text(self):
verification_reminder = "" verification_reminder = ""
refund_reminder_msg = _("You can unenroll in the course and receive a full refund for 14 days after the course "
"start date. ")
is_enrollment_mode_verified = self.course_enrollment.is_verified_enrollment() is_enrollment_mode_verified = self.course_enrollment.is_verified_enrollment()
is_professional_mode_verified = self.course_enrollment.is_professional_enrollment()
if is_enrollment_mode_verified: if is_enrollment_mode_verified:
domain = microsite.get_value('SITE_NAME', settings.SITE_NAME) domain = microsite.get_value('SITE_NAME', settings.SITE_NAME)
...@@ -1995,12 +1998,17 @@ class CertificateItem(OrderItem): ...@@ -1995,12 +1998,17 @@ class CertificateItem(OrderItem):
"If you haven't verified your identity yet, please start the verification process ({verification_url})." "If you haven't verified your identity yet, please start the verification process ({verification_url})."
).format(verification_url=verification_url) ).format(verification_url=verification_url)
if is_professional_mode_verified:
refund_reminder_msg = _("You can unenroll in the course and receive a full refund for 2 days after the "
"course start date. ")
refund_reminder = _( refund_reminder = _(
"You have up to two weeks into the course to unenroll and receive a full refund." "{refund_reminder_msg}"
"To receive your refund, contact {billing_email}. " "To receive your refund, contact {billing_email}. "
"Please include your order number in your email. " "Please include your order number in your email. "
"Please do NOT include your credit card information." "Please do NOT include your credit card information."
).format( ).format(
refund_reminder_msg=refund_reminder_msg,
billing_email=settings.PAYMENT_SUPPORT_EMAIL billing_email=settings.PAYMENT_SUPPORT_EMAIL
) )
......
...@@ -1059,6 +1059,10 @@ class CertificateItemTest(ModuleStoreTestCase): ...@@ -1059,6 +1059,10 @@ class CertificateItemTest(ModuleStoreTestCase):
email = mail.outbox[0] email = mail.outbox[0]
self.assertEquals('Order Payment Confirmation', email.subject) self.assertEquals('Order Payment Confirmation', email.subject)
self.assertNotIn("If you haven't verified your identity yet, please start the verification process", email.body) self.assertNotIn("If you haven't verified your identity yet, please start the verification process", email.body)
self.assertIn(
"You can unenroll in the course and receive a full refund for 2 days after the course start date. ",
email.body
)
class DonationTest(ModuleStoreTestCase): class DonationTest(ModuleStoreTestCase):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment