|
|
|
|
@ -15,6 +15,7 @@ class CourseBuyView(TemplateView): |
|
|
|
|
template_name = 'payment/paymentwall_widget.html' |
|
|
|
|
|
|
|
|
|
def get(self, request, pk=None, *args, **kwargs): |
|
|
|
|
host = request.scheme + '://' + request.get_host() |
|
|
|
|
course = Course.objects.get(id=pk) |
|
|
|
|
course_payment = CoursePayment.objects.create( |
|
|
|
|
user=request.user, |
|
|
|
|
@ -31,9 +32,9 @@ class CourseBuyView(TemplateView): |
|
|
|
|
'pw', |
|
|
|
|
[product], |
|
|
|
|
extra_params={ |
|
|
|
|
'lang': 'ru_RU', |
|
|
|
|
'success_url': reverse_lazy('payment-success'), |
|
|
|
|
'failure_url': reverse_lazy('payment-error'), |
|
|
|
|
'lang': 'ru', |
|
|
|
|
'success_url': host + str(reverse_lazy('payment-success')), |
|
|
|
|
'failure_url': host + str(reverse_lazy('payment-error')), |
|
|
|
|
} |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|