|
|
|
|
@ -1,3 +1,6 @@ |
|
|
|
|
import logging |
|
|
|
|
import json |
|
|
|
|
|
|
|
|
|
from django.contrib import messages |
|
|
|
|
from django.http import HttpResponse |
|
|
|
|
from django.shortcuts import redirect |
|
|
|
|
@ -13,6 +16,8 @@ from apps.school.models import SchoolSchedule |
|
|
|
|
|
|
|
|
|
from .models import AuthorBalance, CoursePayment, SchoolPayment |
|
|
|
|
|
|
|
|
|
logger = logging.getLogger('django') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CourseBuyView(TemplateView): |
|
|
|
|
template_name = 'payment/paymentwall_widget.html' |
|
|
|
|
@ -113,7 +118,9 @@ class PaymentwallCallbackView(View): |
|
|
|
|
payment = product_payment_class.objects.get(pk=payment_id) |
|
|
|
|
except product_payment_class.DoesNotExist: |
|
|
|
|
return HttpResponse(status=403) |
|
|
|
|
|
|
|
|
|
logger.info( |
|
|
|
|
json.dumps(payment_raw_data), |
|
|
|
|
) |
|
|
|
|
payment.status = pingback.get_type() |
|
|
|
|
payment.data = payment_raw_data |
|
|
|
|
payment.save() |
|
|
|
|
|