Add logging for stripe failures.

This commit is contained in:
bsimpson63
2013-03-06 14:38:39 -05:00
parent 2e0923ea6a
commit c641ea0821

View File

@@ -710,7 +710,11 @@ class StripeController(GoldPaymentController):
charge = event.data.object
description = charge.description
passthrough, buyer_name = description.split('-', 1)
try:
passthrough, buyer_name = description.split('-', 1)
except ValueError:
g.log.error('stripe_error on charge: %s', charge)
raise
transaction_id = 'S%s' % charge.id
pennies = charge.amount
months, days = months_and_days_from_pennies(pennies)