|
|
|
|
@ -251,7 +251,7 @@ class YandexCheckView(APIView): |
|
|
|
|
}) |
|
|
|
|
logger_yandex.info(xml_res) |
|
|
|
|
|
|
|
|
|
return xml_res |
|
|
|
|
return Response(xml_res, status=200) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class YandexAvisoView(APIView): |
|
|
|
|
@ -277,15 +277,16 @@ class YandexAvisoView(APIView): |
|
|
|
|
pay.status = Payment.STATUS.SUCCESS |
|
|
|
|
pay.save() |
|
|
|
|
|
|
|
|
|
logger_yandex.info('Finish success pay with invoice_id(yandex) %s' % str(data['invoiceId'])) |
|
|
|
|
|
|
|
|
|
return Response({ |
|
|
|
|
xml_res = dicttoxml.dicttoxml({ |
|
|
|
|
'code': 0, |
|
|
|
|
'shopId': pay.shop_id, |
|
|
|
|
'invoiceId': data['invoiceId'], |
|
|
|
|
'orderSumAmount': pay.order_amount, |
|
|
|
|
'performedDatetime': datetime.datetime.now(), |
|
|
|
|
}, status=200) |
|
|
|
|
}) |
|
|
|
|
logger_yandex.info(xml_res) |
|
|
|
|
|
|
|
|
|
return Response(xml_res, status=200) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class YandexFailView(APIView): |
|
|
|
|
|