|
|
|
|
@ -388,6 +388,7 @@ class YandexCheckView(APIView): |
|
|
|
|
@staticmethod |
|
|
|
|
def post(request): |
|
|
|
|
data = dict() |
|
|
|
|
# TODO заюзать url.parse https://goo.gl/s8Ygos |
|
|
|
|
for i in request.body.decode('utf-8').split('&'): |
|
|
|
|
key = i.split('=')[0] |
|
|
|
|
val = i.split('=')[1] |
|
|
|
|
@ -455,13 +456,9 @@ class YandexAvisoView(APIView): |
|
|
|
|
request="Payment with invoice_id=%s not found" % order_number) |
|
|
|
|
return Response(status=204) |
|
|
|
|
|
|
|
|
|
finance_logger.info('Подтверждение платежа запрос', |
|
|
|
|
request='Get success pay with invoice_id(yandex) %s' % str(data['invoiceId'])) |
|
|
|
|
finance_logger.info('Подтверждение платежа запрос', request=data) |
|
|
|
|
|
|
|
|
|
pay.shop_amount = data['shopSumAmount'] |
|
|
|
|
# invoice = pay.invoice |
|
|
|
|
# invoice.key = data['invoiceId'] |
|
|
|
|
# invoice.save() |
|
|
|
|
pay.status = Payment.STATUS.SUCCESS |
|
|
|
|
now = timezone.now() |
|
|
|
|
pay.performed_datetime = now.isoformat() |
|
|
|
|
|