'Purchase credit from a provider in the course.'

def _purchase_credit(self):

    self.enrollment.mode = 'credit'
    self.enrollment.save()
    CourseEnrollmentAttribute.objects.create(enrollment=self.enrollment, namespace='credit', name='provider_id', value=self.PROVIDER_ID)
