обновление yandex_invoice_id (хранится в некоем key - НАДО ПЕРЕИМЕНОВАТЬ ) для всех ребилинг счетов

remotes/origin/revert-6d879fe8
wad 8 years ago
parent 5f40593093
commit 17bc7be7d5
  1. 9
      finance/views.py

@ -193,6 +193,7 @@ class InvoiceDetailView(APIView):
invoice.status = status
if invoice.status == "F":
# TODO это никогда не выполнится
invoice.real_price = invoice.real_price if real_price is None else real_price
if bill.check_pay() and (invoice.price < price):
@ -217,6 +218,7 @@ class InvoiceDetailView(APIView):
if pay_count > 1:
yandex_pay.shop_id = settings.YANDEX_MONEY_REBILLING_SHOP_ID
yandex_pay.scid = settings.YANDEX_MONEY_REBILLING_SCID
yandex_pay.save()
invoice.yandex_pay = yandex_pay
invoice.send_link()
@ -469,9 +471,10 @@ class YandexAvisoView(APIView):
})
pay.shop_amount = data['shopSumAmount']
invoice = pay.invoice
invoice.key = data['invoiceId']
invoice.save()
# invoice = pay.invoice
# invoice.key = data['invoiceId']
# invoice.save()
InvoiceRebilling.objects.filter(bill=pay.invoice.bill).update(key=data['invoiceId'])
pay.status = Payment.STATUS.SUCCESS
now = timezone.now()
pay.performed_datetime = now.isoformat()

Loading…
Cancel
Save