Merge branch 'dev_fix_pereodic_payment' into 'dev'

Dev fix pereodic payment

See merge request !411
remotes/origin/revert-6d879fe8
Вадим Шандринов 8 years ago
commit 90d8acd615
  1. 23
      finance/views.py
  2. 3
      lms/celery.py

@ -324,16 +324,21 @@ class YandexPay(APIView):
'shopFailURL': settings.YANDEX_MONEY_FAIL_URL,
})
msg = EmailMessage(
'Пользователь перешёл на страницу оплаты.',
'''Пользователь "%s" перешёл на страницу оплаты курса "%s".'''
% (pay.invoice.bill.user.email, Course.objects.get(token=pay.invoice.bill.course_token).title),
'robo@skillbox.ru',
[pay.invoice.bill.opener.email],
bcc=['dmitry.dolya@skillbox.ru'],
)
try:
msg = EmailMessage(
'Пользователь перешёл на страницу оплаты.',
'''Пользователь "%s" перешёл на страницу оплаты курса "%s".'''
% (pay.invoice.bill.user.email, Course.objects.get(token=pay.invoice.bill.course_token).title),
'robo@skillbox.ru',
[pay.invoice.bill.opener.email],
bcc=['dmitry.dolya@skillbox.ru'],
)
msg.send()
msg.send()
except Exception as exc:
logger_yandex.error('YandexPay: Email not sended', exc_info=True, extra={
'exc': exc
})
return redirect(r.url)

@ -21,7 +21,8 @@ register_signal(client)
app.conf.beat_schedule = {
'periodic_billing': {
'schedule': crontab(minute='*/1'),
'schedule': crontab(day_of_month='1', hour='1', minute='1'), # заглушка на время отладки
# 'schedule': crontab(minute='*/1'),
# crontab(minute='0',hour='*/3',),
'task': 'finance.tasks.periodic_billing'
}

Loading…
Cancel
Save