|
|
|
@ -19,7 +19,8 @@ from django.utils.html import strip_tags |
|
|
|
|
|
|
|
|
|
|
|
from courses.models import Course |
|
|
|
from courses.models import Course |
|
|
|
from courses.api import CourseParamsApi |
|
|
|
from courses.api import CourseParamsApi |
|
|
|
from finance.models import Bill, Invoice, InvoiceRebilling |
|
|
|
from finance.models import Bill, Invoice, |
|
|
|
|
|
|
|
ebilling |
|
|
|
from finance.serializers import BillSerializer, InvoiceSerializer |
|
|
|
from finance.serializers import BillSerializer, InvoiceSerializer |
|
|
|
from finance.tasks import setup_periodic_billing |
|
|
|
from finance.tasks import setup_periodic_billing |
|
|
|
from lms.global_decorators import transaction_decorator |
|
|
|
from lms.global_decorators import transaction_decorator |
|
|
|
@ -268,7 +269,7 @@ class YandexPay(APIView): |
|
|
|
pay = Payment.objects.get(id=pk) |
|
|
|
pay = Payment.objects.get(id=pk) |
|
|
|
try: |
|
|
|
try: |
|
|
|
inv = InvoiceRebilling.objects.get(yandex_pay=pay) |
|
|
|
inv = InvoiceRebilling.objects.get(yandex_pay=pay) |
|
|
|
except InvoiceRebilling: |
|
|
|
except InvoiceRebilling.DoesNotExist: |
|
|
|
inv = None |
|
|
|
inv = None |
|
|
|
r = requests.post('https://money.yandex.ru/eshop.xml', data={ |
|
|
|
r = requests.post('https://money.yandex.ru/eshop.xml', data={ |
|
|
|
'shopId': pay.shop_id, |
|
|
|
'shopId': pay.shop_id, |
|
|
|
|