|
|
|
|
@ -238,8 +238,9 @@ class YandexCheckView(APIView): |
|
|
|
|
% (pay.order_amount, data['orderSumAmount'])) |
|
|
|
|
return Response(status=204) |
|
|
|
|
|
|
|
|
|
pay.invoice_id = int(data['invoiceId']) |
|
|
|
|
pay.save() |
|
|
|
|
# TODO Нужно решение |
|
|
|
|
# pay.invoice_id = int(data['invoiceId']) |
|
|
|
|
# pay.save() |
|
|
|
|
logger_yandex.info('Send success pay with invoice_id(yandex) %s' % pay.invoice_id) |
|
|
|
|
|
|
|
|
|
return Response({ |
|
|
|
|
@ -262,7 +263,7 @@ class YandexAvisoView(APIView): |
|
|
|
|
data[key] = val |
|
|
|
|
|
|
|
|
|
try: |
|
|
|
|
pay = Payment.objects.get(invoice_id = data['invoiceId']) |
|
|
|
|
pay = Payment.objects.get(order_number=data['orderNumber']) |
|
|
|
|
except Payment.DoesNotExist: |
|
|
|
|
logger_yandex.error("Payment with invoice_id=%s not found" % data['orderNumber']) |
|
|
|
|
return Response(status=204) |
|
|
|
|
|