StripeController: handle charge.failed with insufficient information.

This commit is contained in:
Brian Simpson
2013-11-17 04:30:27 -05:00
parent 0d0ac728eb
commit 42bf5b2ced

View File

@@ -796,6 +796,12 @@ class StripeController(GoldPaymentController):
# we'll get an additional failure notification event of
# "invoice.payment_failed", don't double notify
return 'dummy', None
elif status == 'charge.failed' and not description:
# create_customer can POST successfully but fail to create a
# customer because the card is declined. This will trigger a
# 'charge.failed' notification but without description so we can't
# do anything with it
return 'dummy', None
elif invoice_id:
# subscription charge - special handling
customer_id = charge.customer