paytechuz 0.2.5__py3-none-any.whl → 0.2.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of paytechuz might be problematic. Click here for more details.

paytechuz/core/base.py CHANGED
@@ -26,16 +26,16 @@ class BasePaymentGateway(ABC):
26
26
  @abstractmethod
27
27
  def create_payment(
28
28
  self,
29
+ id: Union[int, str],
29
30
  amount: Union[int, float, str],
30
- account_id: Union[int, str],
31
31
  **kwargs
32
32
  ) -> Dict[str, Any]:
33
33
  """
34
34
  Create a payment.
35
35
 
36
36
  Args:
37
+ id: The account ID or order ID
37
38
  amount: The payment amount
38
- account_id: The account ID or order ID
39
39
  **kwargs: Additional parameters specific to the payment gateway
40
40
 
41
41
  Returns:
@@ -62,8 +62,8 @@ class ClickGateway(BasePaymentGateway):
62
62
  @handle_exceptions
63
63
  def create_payment(
64
64
  self,
65
+ id: Union[int, str],
65
66
  amount: Union[int, float, str],
66
- account_id: Union[int, str],
67
67
  **kwargs
68
68
  ) -> Dict[str, Any]:
69
69
  """
@@ -71,7 +71,7 @@ class ClickGateway(BasePaymentGateway):
71
71
 
72
72
  Args:
73
73
  amount: The payment amount in som
74
- account_id: The account ID or order ID
74
+ id: The account ID or order ID
75
75
  **kwargs: Additional parameters for the payment
76
76
  - description: Payment description
77
77
  - return_url: URL to return after payment
@@ -87,7 +87,7 @@ class ClickGateway(BasePaymentGateway):
87
87
  amount_tiyin = format_amount(amount)
88
88
 
89
89
  # Extract additional parameters
90
- description = kwargs.get('description', f'Payment for account {account_id}') # noqa
90
+ description = kwargs.get('description', f'Payment for account {id}') # noqa
91
91
  return_url = kwargs.get('return_url')
92
92
  callback_url = kwargs.get('callback_url')
93
93
  # These parameters are not used in the URL but are available in the API
@@ -100,7 +100,7 @@ class ClickGateway(BasePaymentGateway):
100
100
  payment_url += f"?service_id={self.service_id}"
101
101
  payment_url += f"&merchant_id={self.merchant_id}"
102
102
  payment_url += f"&amount={amount}"
103
- payment_url += f"&transaction_param={account_id}"
103
+ payment_url += f"&transaction_param={id}"
104
104
 
105
105
  if return_url:
106
106
  payment_url += f"&return_url={return_url}"
@@ -112,13 +112,13 @@ class ClickGateway(BasePaymentGateway):
112
112
  payment_url += f"&merchant_user_id={description}"
113
113
 
114
114
  # Generate a unique transaction ID
115
- transaction_id = f"click_{account_id}_{int(amount_tiyin)}"
115
+ transaction_id = f"click_{id}_{int(amount_tiyin)}"
116
116
 
117
117
  return {
118
118
  'transaction_id': transaction_id,
119
119
  'payment_url': payment_url,
120
120
  'amount': amount,
121
- 'account_id': account_id,
121
+ 'account_id': id,
122
122
  'status': 'created',
123
123
  'service_id': self.service_id,
124
124
  'merchant_id': self.merchant_id
@@ -70,7 +70,7 @@ class ClickMerchantApi:
70
70
  return hashlib.md5(sign_string.encode('utf-8')).hexdigest()
71
71
 
72
72
  @handle_exceptions
73
- def check_payment(self, account_id: Union[int, str]) -> Dict[str, Any]:
73
+ def check_payment(self, id: Union[int, str]) -> Dict[str, Any]:
74
74
  """
75
75
  Check payment status.
76
76
 
@@ -83,7 +83,7 @@ class ClickMerchantApi:
83
83
  # Prepare request data
84
84
  data = {
85
85
  "service_id": self.service_id,
86
- "merchant_transaction_id": str(account_id),
86
+ "merchant_transaction_id": str(id),
87
87
  "request_id": str(generate_timestamp())
88
88
  }
89
89
 
@@ -102,14 +102,14 @@ class ClickMerchantApi:
102
102
  @handle_exceptions
103
103
  def cancel_payment(
104
104
  self,
105
- account_id: Union[int, str],
105
+ id: Union[int, str],
106
106
  reason: Optional[str] = None
107
107
  ) -> Dict[str, Any]:
108
108
  """
109
109
  Cancel payment.
110
110
 
111
111
  Args:
112
- account_id: Account ID or order ID
112
+ id: Account ID or order ID
113
113
  reason: Optional reason for cancellation
114
114
 
115
115
  Returns:
@@ -118,7 +118,7 @@ class ClickMerchantApi:
118
118
  # Prepare request data
119
119
  data = {
120
120
  "service_id": self.service_id,
121
- "merchant_transaction_id": str(account_id),
121
+ "merchant_transaction_id": str(id),
122
122
  "request_id": str(generate_timestamp())
123
123
  }
124
124
 
@@ -141,8 +141,8 @@ class ClickMerchantApi:
141
141
  @handle_exceptions
142
142
  def create_invoice(
143
143
  self,
144
+ id: Union[int, str],
144
145
  amount: Union[int, float],
145
- account_id: Union[int, str],
146
146
  **kwargs
147
147
  ) -> Dict[str, Any]:
148
148
  """
@@ -161,7 +161,7 @@ class ClickMerchantApi:
161
161
  Dict containing invoice details
162
162
  """
163
163
  # Extract additional parameters
164
- description = kwargs.get('description', f'Payment for account {account_id}')
164
+ description = kwargs.get('description', f'Payment for account {id}')
165
165
  phone = kwargs.get('phone')
166
166
  email = kwargs.get('email')
167
167
  expire_time = kwargs.get('expire_time', 60) # Default 1 hour
@@ -170,7 +170,7 @@ class ClickMerchantApi:
170
170
  data = {
171
171
  "service_id": self.service_id,
172
172
  "amount": float(amount),
173
- "merchant_transaction_id": str(account_id),
173
+ "merchant_transaction_id": str(id),
174
174
  "description": description,
175
175
  "request_id": str(generate_timestamp()),
176
176
  "expire_time": expire_time
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: paytechuz
3
- Version: 0.2.5
3
+ Version: 0.2.6
4
4
  Summary: Unified Python package for Uzbekistan payment gateways
5
5
  Home-page: https://github.com/Muhammadali-Akbarov/paytechuz
6
6
  Author: Muhammadali Akbarov
@@ -1,6 +1,6 @@
1
1
  paytechuz/__init__.py,sha256=FDe29y0Xs8ar0t0pvOMbFUmOkty_sqxuNvl3_VyYR6s,1753
2
2
  paytechuz/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- paytechuz/core/base.py,sha256=pW_0QrlyX0F8XVToeeDEI78ygAF2IgvvvyUGYMHH9bs,2565
3
+ paytechuz/core/base.py,sha256=Es6eEGNgDjQJe-kEJVAHSAh8AWbgtIuQMm0xn7qfjl4,2549
4
4
  paytechuz/core/constants.py,sha256=P2zeZ_cfZIttdC1vqkpIngkfRFh6loWzJYEgzQb5cKA,1660
5
5
  paytechuz/core/exceptions.py,sha256=XMJkqiponTkvhjoh3S2iFNuU3UbBdFW4130kd0hpudg,5489
6
6
  paytechuz/core/http.py,sha256=1PFv_Fo62GtfyYKUK2nsT4AaeQNuMgZlFUFL1q9p2MI,7672
@@ -8,8 +8,8 @@ paytechuz/core/utils.py,sha256=EbNtDweR1ABOtCu4D6cYlolM0t_fbiE3gNoc_qfcKKA,4704
8
8
  paytechuz/core/payme/errors.py,sha256=CZE62MbYDMsRfNIX23Syt6of_tPMMGLnXhYMii4hw3A,542
9
9
  paytechuz/gateways/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  paytechuz/gateways/click/__init__.py,sha256=35RPIrZYHgMWDzxjQkJMZYjzHDa8cY_BqQztCdZZmBM,90
11
- paytechuz/gateways/click/client.py,sha256=NC9bHP2A_9ZagE1G4OBrckvefLhyALzs76tzKoc6x8U,6682
12
- paytechuz/gateways/click/merchant.py,sha256=d8YUaxm5X51xFtI2_M6xtjZ-L2BvbU0T9YTJwodF7gU,7255
11
+ paytechuz/gateways/click/client.py,sha256=S7ESKjOsZLJweeip1Pw3kWpi7Cc7apo1RZRjdghqxWM,6634
12
+ paytechuz/gateways/click/merchant.py,sha256=tvHUwNr_eiDz_ED4-m2GNBh_LXN0b5lwtq1jw1e0zAQ,7191
13
13
  paytechuz/gateways/click/webhook.py,sha256=rph-NmjjnBKMW4rcxQTXrHHdK-uMrU39kXnbqK56leo,7936
14
14
  paytechuz/gateways/payme/__init__.py,sha256=KcVkYvAEblL4ASVAOrUofRBwywAkTZIgRXoBaCbYtv8,90
15
15
  paytechuz/gateways/payme/cards.py,sha256=iyitnAIQ_BUNmF273ErSLe3GOs5LYp3pWHxdb_FtOzs,5421
@@ -30,7 +30,7 @@ paytechuz/integrations/fastapi/__init__.py,sha256=DLnhAZQZf2ghu8BuFFfE7FzbNKWQQ2
30
30
  paytechuz/integrations/fastapi/models.py,sha256=eWGUpiKufj47AK8Hld4A91jRDj0ZKQzAf95CyUozmvo,4638
31
31
  paytechuz/integrations/fastapi/routes.py,sha256=D17QeyY4-aX6tCNmk5h3UiavukvVrE5e6JOFCy4t_n8,36629
32
32
  paytechuz/integrations/fastapi/schemas.py,sha256=CkNohj22mQQje8Pu_IkTQwUPAoYHNOKXlGjqaRX_SGQ,3784
33
- paytechuz-0.2.5.dist-info/METADATA,sha256=7mdAIIZfMprRMXd1nIGW4dcrYi2WvL6RuvYIhMTU3Qs,4390
34
- paytechuz-0.2.5.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
35
- paytechuz-0.2.5.dist-info/top_level.txt,sha256=oloyKGNVj9Z2h3wpKG5yPyTlpdpWW0-CWr-j-asCWBc,10
36
- paytechuz-0.2.5.dist-info/RECORD,,
33
+ paytechuz-0.2.6.dist-info/METADATA,sha256=vhddMLMMeJ6fQsQlIMtH5S66LuYC1zh1TlxZOMq7Cac,4390
34
+ paytechuz-0.2.6.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
35
+ paytechuz-0.2.6.dist-info/top_level.txt,sha256=oloyKGNVj9Z2h3wpKG5yPyTlpdpWW0-CWr-j-asCWBc,10
36
+ paytechuz-0.2.6.dist-info/RECORD,,