diff --git a/finance/views.py b/finance/views.py
index 5af8fd6..33fe3cf 100644
--- a/finance/views.py
+++ b/finance/views.py
@@ -25,13 +25,17 @@ from finance.tasks import setup_periodic_billing
from lms.global_decorators import transaction_decorator
from lms.tools import get_real_name
from django.utils import timezone
+import uuid
logger_yandex = logging.getLogger('yandex_money')
def test_pay(request):
return render_to_response('yandex/test_pay.html', context={
- 'shop_id': settings.YANDEX_MONEY_SHOP_ID, 'sc_id': settings.YANDEX_MONEY_TEST_SCID})
+ 'shop_id': settings.YANDEX_MONEY_SHOP_ID,
+ 'sc_id': settings.YANDEX_MONEY_TEST_SCID,
+ 'order_number': str(uuid.uuid4())[:12]
+})
class BillListView(APIView):
@@ -482,7 +486,7 @@ class DemoYandexCheckView(APIView):
@staticmethod
def post(request):
- # Деалем допущение, что orderNumber=abc1111111 иначе всё плохо
+ # Деалем допущение, что customerNumber=abc1111111 иначе всё плохо
data = dict()
try:
for i in request.body.decode('utf-8').split('&'):
@@ -496,7 +500,7 @@ class DemoYandexCheckView(APIView):
now = timezone.now()
try:
- if data['invoiceId'] == "abc1111111":
+ if data['customerNumber'] == "abc000":
xml_res = """
+ Отправление формы срабатывает только раз затем нужно будет заменить orderNumber
-
+