Improve logger message
This commit is contained in:
parent
4147b8f891
commit
ecdc0c32fb
1 changed files with 1 additions and 2 deletions
|
@ -109,12 +109,11 @@ def handle_invoice_webhook(request):
|
||||||
send_plain_email_task.delay(email_to_admin_data)
|
send_plain_email_task.delay(email_to_admin_data)
|
||||||
|
|
||||||
elif event.type == "invoice.payment_failed":
|
elif event.type == "invoice.payment_failed":
|
||||||
logger.error("Invoice payment failed")
|
|
||||||
|
|
||||||
admin_msg_sub = "Invoice payment FAILED for user {} and {}".format(
|
admin_msg_sub = "Invoice payment FAILED for user {} and {}".format(
|
||||||
stripe_customer.user.email,
|
stripe_customer.user.email,
|
||||||
invoice.lines.data.metadata
|
invoice.lines.data.metadata
|
||||||
)
|
)
|
||||||
|
logger.error(admin_msg_sub)
|
||||||
email_to_admin_data = {
|
email_to_admin_data = {
|
||||||
'subject': admin_msg_sub,
|
'subject': admin_msg_sub,
|
||||||
'from_email': settings.DCL_SUPPORT_FROM_ADDRESS,
|
'from_email': settings.DCL_SUPPORT_FROM_ADDRESS,
|
||||||
|
|
Loading…
Reference in a new issue