|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
|
import csv |
|
|
|
|
import logging |
|
|
|
|
import datetime |
|
|
|
|
import dicttoxml |
|
|
|
|
|
|
|
|
|
import requests |
|
|
|
|
from django.contrib.auth import get_user_model |
|
|
|
|
@ -241,15 +242,16 @@ class YandexCheckView(APIView): |
|
|
|
|
# TODO Нужно решение |
|
|
|
|
# pay.invoice_id = int(data['invoiceId']) |
|
|
|
|
# pay.save() |
|
|
|
|
logger_yandex.info('Send success pay with invoice_id(yandex) %s' % str(data['invoiceId'])) |
|
|
|
|
|
|
|
|
|
return Response({ |
|
|
|
|
xml_res = dicttoxml.dicttoxml({ |
|
|
|
|
'code': 0, |
|
|
|
|
'shopId': pay.shop_id, |
|
|
|
|
'invoiceId': data['invoiceId'], |
|
|
|
|
'orderSumAmount': pay.order_amount, |
|
|
|
|
'performedDatetime': datetime.datetime.now(), |
|
|
|
|
}, status=200) |
|
|
|
|
}) |
|
|
|
|
logger_yandex.info(xml_res) |
|
|
|
|
|
|
|
|
|
return xml_res |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class YandexAvisoView(APIView): |
|
|
|
|
|