paytechuz 0.3.4__py3-none-any.whl → 0.3.5__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/gateways/click/client.py +69 -0
- paytechuz/gateways/click/merchant.py +102 -0
- {paytechuz-0.3.4.dist-info → paytechuz-0.3.5.dist-info}/METADATA +1 -1
- {paytechuz-0.3.4.dist-info → paytechuz-0.3.5.dist-info}/RECORD +6 -6
- {paytechuz-0.3.4.dist-info → paytechuz-0.3.5.dist-info}/WHEEL +0 -0
- {paytechuz-0.3.4.dist-info → paytechuz-0.3.5.dist-info}/top_level.txt +0 -0
|
@@ -204,3 +204,72 @@ class ClickGateway(BasePaymentGateway):
|
|
|
204
204
|
'cancelled_at': cancel_data.get('cancelled_at'),
|
|
205
205
|
'raw_response': cancel_data
|
|
206
206
|
}
|
|
207
|
+
|
|
208
|
+
@handle_exceptions
|
|
209
|
+
def card_token_request(
|
|
210
|
+
self,
|
|
211
|
+
card_number: str,
|
|
212
|
+
expire_date: str,
|
|
213
|
+
temporary: int = 0
|
|
214
|
+
) -> Dict[str, Any]:
|
|
215
|
+
"""
|
|
216
|
+
Request a card token for card payment.
|
|
217
|
+
|
|
218
|
+
Args:
|
|
219
|
+
card_number: Card number (e.g., "5614681005030279")
|
|
220
|
+
expire_date: Card expiration date (e.g., "0330" for March 2030)
|
|
221
|
+
temporary: Whether the token is temporary (0 or 1)
|
|
222
|
+
|
|
223
|
+
Returns:
|
|
224
|
+
Dict containing card token and related information
|
|
225
|
+
"""
|
|
226
|
+
return self.merchant_api.card_token_request(
|
|
227
|
+
card_number=card_number,
|
|
228
|
+
expire_date=expire_date,
|
|
229
|
+
temporary=temporary
|
|
230
|
+
)
|
|
231
|
+
|
|
232
|
+
@handle_exceptions
|
|
233
|
+
def card_token_verify(
|
|
234
|
+
self,
|
|
235
|
+
card_token: str,
|
|
236
|
+
sms_code: Union[int, str]
|
|
237
|
+
) -> Dict[str, Any]:
|
|
238
|
+
"""
|
|
239
|
+
Verify a card token with SMS code.
|
|
240
|
+
|
|
241
|
+
Args:
|
|
242
|
+
card_token: Card token from card_token_request
|
|
243
|
+
sms_code: SMS code sent to the card holder
|
|
244
|
+
|
|
245
|
+
Returns:
|
|
246
|
+
Dict containing verification status and card information
|
|
247
|
+
"""
|
|
248
|
+
return self.merchant_api.card_token_verify(
|
|
249
|
+
card_token=card_token,
|
|
250
|
+
sms_code=sms_code
|
|
251
|
+
)
|
|
252
|
+
|
|
253
|
+
@handle_exceptions
|
|
254
|
+
def card_token_payment(
|
|
255
|
+
self,
|
|
256
|
+
card_token: str,
|
|
257
|
+
amount: Union[int, float],
|
|
258
|
+
transaction_parameter: str
|
|
259
|
+
) -> Dict[str, Any]:
|
|
260
|
+
"""
|
|
261
|
+
Make a payment using a verified card token.
|
|
262
|
+
|
|
263
|
+
Args:
|
|
264
|
+
card_token: Verified card token
|
|
265
|
+
amount: Payment amount in som
|
|
266
|
+
transaction_parameter: Unique transaction parameter
|
|
267
|
+
|
|
268
|
+
Returns:
|
|
269
|
+
Dict containing payment status and payment ID
|
|
270
|
+
"""
|
|
271
|
+
return self.merchant_api.card_token_payment(
|
|
272
|
+
card_token=card_token,
|
|
273
|
+
amount=amount,
|
|
274
|
+
transaction_parameter=transaction_parameter
|
|
275
|
+
)
|
|
@@ -263,3 +263,105 @@ class ClickMerchantApi:
|
|
|
263
263
|
)
|
|
264
264
|
|
|
265
265
|
return response
|
|
266
|
+
|
|
267
|
+
@handle_exceptions
|
|
268
|
+
def card_token_request(
|
|
269
|
+
self,
|
|
270
|
+
card_number: str,
|
|
271
|
+
expire_date: str,
|
|
272
|
+
temporary: int = 0
|
|
273
|
+
) -> Dict[str, Any]:
|
|
274
|
+
"""
|
|
275
|
+
Request a card token for card payment.
|
|
276
|
+
|
|
277
|
+
Args:
|
|
278
|
+
card_number: Card number (e.g., "5614681005030279")
|
|
279
|
+
expire_date: Card expiration date (e.g., "0330" for March 2030)
|
|
280
|
+
temporary: Whether the token is temporary (0 or 1)
|
|
281
|
+
|
|
282
|
+
Returns:
|
|
283
|
+
Dict containing card token and related information
|
|
284
|
+
"""
|
|
285
|
+
data = {
|
|
286
|
+
"service_id": self.service_id,
|
|
287
|
+
"card_number": card_number,
|
|
288
|
+
"expire_date": expire_date,
|
|
289
|
+
"temporary": temporary
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
if self.secret_key:
|
|
293
|
+
data["sign"] = self._generate_signature(data)
|
|
294
|
+
|
|
295
|
+
response = self.http_client.post(
|
|
296
|
+
endpoint=f"{ClickEndpoints.MERCHANT_API}/card_token/request",
|
|
297
|
+
json_data=data
|
|
298
|
+
)
|
|
299
|
+
|
|
300
|
+
return response
|
|
301
|
+
|
|
302
|
+
@handle_exceptions
|
|
303
|
+
def card_token_verify(
|
|
304
|
+
self,
|
|
305
|
+
card_token: str,
|
|
306
|
+
sms_code: Union[int, str]
|
|
307
|
+
) -> Dict[str, Any]:
|
|
308
|
+
"""
|
|
309
|
+
Verify a card token with SMS code.
|
|
310
|
+
|
|
311
|
+
Args:
|
|
312
|
+
card_token: Card token from card_token_request
|
|
313
|
+
sms_code: SMS code sent to the card holder
|
|
314
|
+
|
|
315
|
+
Returns:
|
|
316
|
+
Dict containing verification status and card information
|
|
317
|
+
"""
|
|
318
|
+
data = {
|
|
319
|
+
"service_id": self.service_id,
|
|
320
|
+
"card_token": card_token,
|
|
321
|
+
"sms_code": int(sms_code)
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
if self.secret_key:
|
|
325
|
+
data["sign"] = self._generate_signature(data)
|
|
326
|
+
|
|
327
|
+
response = self.http_client.post(
|
|
328
|
+
endpoint=f"{ClickEndpoints.MERCHANT_API}/card_token/verify",
|
|
329
|
+
json_data=data
|
|
330
|
+
)
|
|
331
|
+
|
|
332
|
+
return response
|
|
333
|
+
|
|
334
|
+
@handle_exceptions
|
|
335
|
+
def card_token_payment(
|
|
336
|
+
self,
|
|
337
|
+
card_token: str,
|
|
338
|
+
amount: Union[int, float],
|
|
339
|
+
transaction_parameter: str
|
|
340
|
+
) -> Dict[str, Any]:
|
|
341
|
+
"""
|
|
342
|
+
Make a payment using a verified card token.
|
|
343
|
+
|
|
344
|
+
Args:
|
|
345
|
+
card_token: Verified card token
|
|
346
|
+
amount: Payment amount in som
|
|
347
|
+
transaction_parameter: Unique transaction parameter
|
|
348
|
+
|
|
349
|
+
Returns:
|
|
350
|
+
Dict containing payment status and payment ID
|
|
351
|
+
"""
|
|
352
|
+
data = {
|
|
353
|
+
"service_id": self.service_id,
|
|
354
|
+
"card_token": card_token,
|
|
355
|
+
"amount": float(amount),
|
|
356
|
+
"transaction_parameter": transaction_parameter
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
if self.secret_key:
|
|
360
|
+
data["sign"] = self._generate_signature(data)
|
|
361
|
+
|
|
362
|
+
response = self.http_client.post(
|
|
363
|
+
endpoint=f"{ClickEndpoints.MERCHANT_API}/card_token/payment",
|
|
364
|
+
json_data=data
|
|
365
|
+
)
|
|
366
|
+
|
|
367
|
+
return response
|
|
@@ -11,8 +11,8 @@ paytechuz/gateways/atmos/__init__.py,sha256=piVcHu32K-D8I0Kr6bSXXrdtny2S5TY0hxMb
|
|
|
11
11
|
paytechuz/gateways/atmos/client.py,sha256=Llo4utBVYPq1a3eLQaCtOMIzXooRhati3Eh2o6qbVdE,6212
|
|
12
12
|
paytechuz/gateways/atmos/webhook.py,sha256=bqMHipJ_GowGYuxVaZd2f8bSEzSNHavdsvpGpsqy96s,2989
|
|
13
13
|
paytechuz/gateways/click/__init__.py,sha256=35RPIrZYHgMWDzxjQkJMZYjzHDa8cY_BqQztCdZZmBM,90
|
|
14
|
-
paytechuz/gateways/click/client.py,sha256=
|
|
15
|
-
paytechuz/gateways/click/merchant.py,sha256=
|
|
14
|
+
paytechuz/gateways/click/client.py,sha256=kfivz_GA6YigE1ZE9sw3iqpcvM0kZ2m0bnyXKWP5tvs,8688
|
|
15
|
+
paytechuz/gateways/click/merchant.py,sha256=b9_jvwR0qbnPgVfNj_LenupxFTG0iA7e-tpQfJgw5nw,9998
|
|
16
16
|
paytechuz/gateways/click/webhook.py,sha256=rph-NmjjnBKMW4rcxQTXrHHdK-uMrU39kXnbqK56leo,7936
|
|
17
17
|
paytechuz/gateways/payme/__init__.py,sha256=KcVkYvAEblL4ASVAOrUofRBwywAkTZIgRXoBaCbYtv8,90
|
|
18
18
|
paytechuz/gateways/payme/cards.py,sha256=JociR-Y405fUxiqP96WSLJMu45bc_oa5YszxenchHDc,6291
|
|
@@ -34,7 +34,7 @@ paytechuz/integrations/fastapi/__init__.py,sha256=DLnhAZQZf2ghu8BuFFfE7FzbNKWQQ2
|
|
|
34
34
|
paytechuz/integrations/fastapi/models.py,sha256=9IqrsndIVuIDwDbijZ89biJxEWQASXRBfWVShxgerAc,5113
|
|
35
35
|
paytechuz/integrations/fastapi/routes.py,sha256=t8zbqhMZsaJmEvMDgmF-NoRmbqksfX_AvIrx-3kCjg8,37845
|
|
36
36
|
paytechuz/integrations/fastapi/schemas.py,sha256=PgRqviJiD4-u3_CIkUOX8R7L8Yqn8L44WLte7968G0E,3887
|
|
37
|
-
paytechuz-0.3.
|
|
38
|
-
paytechuz-0.3.
|
|
39
|
-
paytechuz-0.3.
|
|
40
|
-
paytechuz-0.3.
|
|
37
|
+
paytechuz-0.3.5.dist-info/METADATA,sha256=3v6I13IAz9EKUKK-ceZrsfSiL1M8Cw6Q8g-8KK0S3vI,13096
|
|
38
|
+
paytechuz-0.3.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
39
|
+
paytechuz-0.3.5.dist-info/top_level.txt,sha256=oloyKGNVj9Z2h3wpKG5yPyTlpdpWW0-CWr-j-asCWBc,10
|
|
40
|
+
paytechuz-0.3.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|