You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

exceptions.py 615B

1234567891011121314151617181920212223242526272829303132
  1. class PaymentError(Exception):
  2. pass
  3. class TransactionDeclined(PaymentError):
  4. pass
  5. class GatewayError(PaymentError):
  6. pass
  7. class InvalidGatewayRequestError(PaymentError):
  8. pass
  9. class RedirectRequired(PaymentError):
  10. """
  11. Exception to be used when payment processsing requires a redirect
  12. """
  13. def __init__(self, url):
  14. self.url = url
  15. class UnableToTakePayment(PaymentError):
  16. """
  17. Exception to be used for ANTICIPATED payment errors (eg card number wrong, expiry date
  18. has passed). The message passed here will be shown to the end user.
  19. """
  20. pass