Skip to content
This repository has been archived by the owner on Sep 5, 2019. It is now read-only.

Commit

Permalink
Adds a tuple containing all card error exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Krienbühl committed Jun 6, 2017
1 parent a9df992 commit c1daaf3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions onegov/pay/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
log = logging.getLogger('onegov.pay') # noqa
log.addHandler(logging.NullHandler()) # noqa

from onegov.pay.errors import CARD_ERRORS
from onegov.pay.models import ManualPayment
from onegov.pay.models import Payable, Payment, PaymentProvider
from onegov.pay.collections import PaymentCollection, PayableCollection
Expand All @@ -11,6 +12,7 @@

__all__ = (
'log',
'CARD_ERRORS',
'ManualPayment',
'Payable',
'PayableCollection',
Expand Down
5 changes: 5 additions & 0 deletions onegov/pay/errors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import stripe

# the following exceptions should be caught and logged - the user should be
# informed that the payment failed, but not why
CARD_ERRORS = (stripe.error.CardError, )

0 comments on commit c1daaf3

Please sign in to comment.