mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-26 07:19:25 -05:00
StripeController: handle charge.failed with insufficient information.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user