Skip to content

components.payment_gateway.public.exceptions

Classes

PaymentGatewayException

Bases: Exception

Base class for all the Payment Gateway exceptions.

ProviderNotSupportedException

ProviderNotSupportedException(provider)

Bases: PaymentGatewayException

Exception raised when a Payment Service Provider is not supported for a given operation.

Typically raised when the credentials are missing for the provider's API client, for example is a PSP can't be used in a given country.

Source code in components/payment_gateway/public/exceptions.py
def __init__(self, provider: PaymentServiceProvider):
    self.provider = provider
    super().__init__(f"Provider {provider} is not supported for this operation")

Attributes

provider instance-attribute
provider = provider