Yandex_update

feature/fix_accout_not_found
Andrey 8 years ago
parent d88519d0f7
commit f122227418
  1. 12
      finance/views.py

@ -244,14 +244,14 @@ class YandexCheckView(APIView):
# pay.save() # pay.save()
xml_res = dicttoxml.dicttoxml({ xml_res = dicttoxml.dicttoxml({
'code': 0, 'code': 0,
'shopId': pay.shop_id, 'shopId': int(pay.shop_id),
'invoiceId': data['invoiceId'], 'invoiceId': int(data['invoiceId']),
'orderSumAmount': pay.order_amount, 'orderSumAmount': pay.order_amount,
'performedDatetime': datetime.datetime.now(), 'performedDatetime': datetime.datetime.now(),
}) })
logger_yandex.info(xml_res) logger_yandex.info(xml_res)
return Response(xml_res, status=200) return HttpResponse(xml_res, content_type='application/xml')
class YandexAvisoView(APIView): class YandexAvisoView(APIView):
@ -279,14 +279,14 @@ class YandexAvisoView(APIView):
xml_res = dicttoxml.dicttoxml({ xml_res = dicttoxml.dicttoxml({
'code': 0, 'code': 0,
'shopId': pay.shop_id, 'shopId':int(pay.shop_id),
'invoiceId': data['invoiceId'], 'invoiceId': int(data['invoiceId']),
'orderSumAmount': pay.order_amount, 'orderSumAmount': pay.order_amount,
'performedDatetime': datetime.datetime.now(), 'performedDatetime': datetime.datetime.now(),
}) })
logger_yandex.info(xml_res) logger_yandex.info(xml_res)
return Response(xml_res, status=200) return HttpResponse(xml_res, content_type='application/xml')
class YandexFailView(APIView): class YandexFailView(APIView):

Loading…
Cancel
Save