Renable submit button on all stripe exceptions.

This commit is contained in:
Brian Simpson
2013-10-31 14:48:03 -04:00
parent a0d39d680e
commit 89ffb73378

View File

@@ -640,7 +640,6 @@ def handle_stripe_error(fn):
except stripe.CardError as e:
form.set_html('.status',
_('error: %(error)s') % {'error': e.message})
form.find('.stripe-submit').removeAttr('disabled').end()
except stripe.InvalidRequestError as e:
form.set_html('.status', _('invalid request'))
except stripe.APIConnectionError as e:
@@ -650,6 +649,9 @@ def handle_stripe_error(fn):
except stripe.StripeError as e:
form.set_html('.status', _('error'))
g.log.error('stripe error: %s' % e)
except:
raise
form.find('.stripe-submit').removeAttr('disabled').end()
return wrapper