From 80efd39c460ee4e987b664863e274a9f5e18d24f Mon Sep 17 00:00:00 2001 From: mozinova <148253541+mozinova@users.noreply.github.com> Date: Sun, 1 Mar 2026 10:07:25 +0200 Subject: [PATCH 1/3] flowless: Update .gitignore Clean up duplicate patterns to reduce confusion and maintain a clean gitignore file --- .gitignore | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitignore b/.gitignore index fa3a7de..8be8af9 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,4 @@ env.bak/ venv.bak/ include bin/ -lib/ -lib64/ usr/ From ea6afede16872a0600d72899ab2fb12c5d437fb7 Mon Sep 17 00:00:00 2001 From: mozinova <148253541+mozinova@users.noreply.github.com> Date: Sun, 1 Mar 2026 10:07:26 +0200 Subject: [PATCH 2/3] flowless: Update src/paysgator/client.py Fix two issues: remove unused import to clean up code, and fix instance vs class attribute bug that would cause multiple client instances to share the same BASE_URL configuration --- src/paysgator/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/paysgator/client.py b/src/paysgator/client.py index a067367..7514e8c 100644 --- a/src/paysgator/client.py +++ b/src/paysgator/client.py @@ -6,7 +6,7 @@ SubscriptionResponse, SubscriptionUpdateRequest, TransactionResponse, WalletBalanceResponse ) -from .exceptions import AuthenticationError, APIError +from .exceptions import APIError class Resource: def __init__(self, client): @@ -66,7 +66,7 @@ def __init__(self, api_key: str): self.wallet = Wallet(self) def set_base_url(self, url: str): - self.BASE_URL = url +self.base_url = url def request(self, method: str, endpoint: str, data: Optional[dict] = None) -> dict: url = f"{self.BASE_URL}{endpoint}" From c1d16c22a3783ab74036a003d07002d3acba70ed Mon Sep 17 00:00:00 2001 From: mozinova <148253541+mozinova@users.noreply.github.com> Date: Sun, 1 Mar 2026 10:07:26 +0200 Subject: [PATCH 3/3] flowless: Update src/paysgator/models.py Fix redundant aliases and add basic validation for amount field to prevent invalid negative payments --- src/paysgator/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/paysgator/models.py b/src/paysgator/models.py index 8863e2d..0e23852 100644 --- a/src/paysgator/models.py +++ b/src/paysgator/models.py @@ -7,10 +7,10 @@ class Mode(str, Enum): TEST = "TEST" class PaymentCreateRequest(BaseModel): - amount: float + amount: float = Field(..., gt=0) currency: str external_transaction_id: Optional[str] = Field(None, alias="externalTransactionId") - payment_methods: Optional[List[str]] = Field(None, alias="payment_methods") + payment_methods: Optional[List[str]] = Field(None) fields: Optional[List[str]] = None return_url: Optional[str] = Field(None, alias="returnUrl") metadata: Optional[Dict[str, Any]] = None @@ -34,7 +34,7 @@ class Customer(BaseModel): class PaymentConfirmRequest(BaseModel): payment_link_id: str = Field(..., alias="paymentLinkId") payment_method: str = Field(..., alias="paymentMethod") - payment_fields: Optional[Dict[str, Any]] = Field(None, alias="payment_fields") + payment_fields: Optional[Dict[str, Any]] = Field(None) customer: Optional[Customer] = None class PaymentConfirmResponseData(BaseModel):