diff --git a/lms/djangoapps/verify_student/views.py b/lms/djangoapps/verify_student/views.py index 60ff619c84..5a14f5f38e 100644 --- a/lms/djangoapps/verify_student/views.py +++ b/lms/djangoapps/verify_student/views.py @@ -74,7 +74,7 @@ def create_order(request): if not verified_mode: return HttpResponseBadRequest(_("This course doesn't support verified certificates")) - if contribution < verified_mode.min_price: + if int(contribution) < verified_mode.min_price: return HttpResponseBadRequest(_("No selected price or selected price is below minimum.")) # I know, we should check this is valid. All kinds of stuff missing here diff --git a/lms/templates/verify_student/photo_verification.html b/lms/templates/verify_student/photo_verification.html index 0bfc2a3a49..ea8d85b74f 100644 --- a/lms/templates/verify_student/photo_verification.html +++ b/lms/templates/verify_student/photo_verification.html @@ -19,10 +19,21 @@ } var submitToPaymentProcessing = function() { + var contribution_input = $("input[name='contribution']:checked") + var contribution = 0; + if(contribution_input.attr('id') == 'contribution-other') + { + contribution = $("input[name='contribution-other-amt']").val(); + } + else + { + contribution = contribution_input.val(); + } var xhr = $.post( "create_order", { - "course_id" : "${course_id}" + "course_id" : "${course_id}", + "contribution": contribution }, function(data) { for (prop in data) {