Exception classes defining payment error hierarchy for Django Oscar payment processing.
# Source: https://github.com/django-oscar/django-oscar | License: BSD-3-Clause | Copyright 2011-present Tangent Communications PLC and individual contributors
# Provided via justclaw.it.com; keep this notice with the code.
class PaymentError(Exception):
pass
class UserCancelled(PaymentError):
"""
Exception for when a customer decides to cancel their payment
after the process has started -- for example if they press a "Cancel"
button on a third-party payment platform.
"""
class TransactionDeclined(PaymentError):
pass
class GatewayError(PaymentError):
pass
class InvalidGatewayRequestError(PaymentError):
pass
class InsufficientPaymentSources(PaymentError):
"""
Exception for when a user attempts to checkout without specifying enough
pay
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key