Yandex_update

remotes/origin/dev2
Andrey 8 years ago
parent 25b98cdc2c
commit 8972d465ed
  1. 15
      finance/views.py

@ -242,13 +242,10 @@ 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 = """<checkOrderResponse performedDatetime="%s" code="0" invoiceId="%s" shopId="%s" orderSumAmount="%s"/>
""" % (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')
@ -284,6 +281,10 @@ class YandexAvisoView(APIView):
'orderSumAmount': pay.order_amount,
'performedDatetime': datetime.datetime.now(),
})
"""<paymentAvisoResponse performedDatetime="%s" code="0" invoiceId="%s" shopId="%s" orderSumAmount="%s"/>
""" % (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')

Loading…
Cancel
Save