diff --git a/finance/views.py b/finance/views.py index b3bf9c1..6a69bed 100644 --- a/finance/views.py +++ b/finance/views.py @@ -246,16 +246,13 @@ class YandexCheckView(APIView): # TODO Нужно решение # pay.invoice_id = int(data['invoiceId']) # pay.save() - xml_res = dicttoxml.dicttoxml({ - 'code': 0, - 'shopId': int(pay.shop_id), - 'invoiceId': int(data['invoiceId']), - 'orderSumAmount': pay.order_amount, - 'performedDatetime': datetime.datetime.now(), - }) + + xml_res = """ + """ % (datetime.datetime.now(), str(data['invoiceId']), str(pay.shop_id), str(pay.order_amount)) + logger_yandex.info(xml_res) - return Response(xml_res, content_type='application/xml') + return HttpResponse(xml_res, content_type='application/xml') class YandexAvisoView(APIView): @@ -288,6 +285,10 @@ class YandexAvisoView(APIView): 'orderSumAmount': pay.order_amount, 'performedDatetime': datetime.datetime.now(), }) + + """ + """ % (datetime.datetime.now(), str(data['invoiceId']), str(pay.shop_id), str(pay.order_amount)) + logger_yandex.info(xml_res) return HttpResponse(xml_res, content_type='application/xml')