|
|
|
|
@ -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') |
|
|
|
|
|