Merge branch 'dev' into 'master'

Dev

See merge request !189
master
Andrey 8 years ago
commit fc647e1eeb
  1. 19
      finance/views.py

@ -242,16 +242,17 @@ class YandexCheckView(APIView):
# TODO Нужно решение
# pay.invoice_id = int(data['invoiceId'])
# pay.save()
xml_res = dicttoxml.dicttoxml({
res = {
'code': 0,
'shopId': int(pay.shop_id),
'invoiceId': int(data['invoiceId']),
'orderSumAmount': pay.order_amount,
'performedDatetime': datetime.datetime.now(),
})
logger_yandex.info(xml_res)
}
return HttpResponse(xml_res, content_type='application/xml')
logger_yandex.info(res)
return Response(res, status=200)
class YandexAvisoView(APIView):
@ -277,16 +278,16 @@ class YandexAvisoView(APIView):
pay.status = Payment.STATUS.SUCCESS
pay.save()
xml_res = dicttoxml.dicttoxml({
res = {
'code': 0,
'shopId':int(pay.shop_id),
'shopId': int(pay.shop_id),
'invoiceId': int(data['invoiceId']),
'orderSumAmount': pay.order_amount,
'performedDatetime': datetime.datetime.now(),
})
logger_yandex.info(xml_res)
}
logger_yandex.info(res)
return HttpResponse(xml_res, content_type='application/xml')
return Response(res, status=200)
class YandexFailView(APIView):

Loading…
Cancel
Save