Skip to content

Commit

Permalink
Merge pull request #99 from PayTechUz/fix/insufficient-funds
Browse files Browse the repository at this point in the history
added: new error code for insufficient fund error
  • Loading branch information
Muhammadali-Akbarov authored Nov 24, 2024
2 parents 085fdd4 + cdd9934 commit 37f5055
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions payme/exceptions/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,14 @@ def __init__(self, data=None):
super().__init__(-31303, self.message, data)


class InsufficientFundsErrorV2(CardError):
"""Insufficient funds on the card."""
message = "Insufficient funds on the card."

def __init__(self, data=None):
super().__init__(-31630, self.message, data)


class InvalidCardNumberError(CardError):
"""Invalid card number provided."""
message = "Invalid card number."
Expand Down Expand Up @@ -254,6 +262,7 @@ def __init__(self, message="Unknown partner or ID and Key not active", data=None
-31301: SmsNotConnectedError,
-31302: BalanceError,
-31303: InsufficientFundsError,
-31630: InsufficientFundsErrorV2,
-31300: InvalidCardNumberError,
-31002: ProcessingServerError,
-31110: OtpSendError,
Expand Down

0 comments on commit 37f5055

Please sign in to comment.