|
1 | | -# python-simpay-api |
| 1 | +# SimPay-API-Python |
| 2 | +Oficjalny klient do wszystkich API SimPay |
2 | 3 |
|
3 | | -## SMS |
4 | | -### Weryfikacja kodu |
5 | | -```python |
6 | | -from payments.sms import SMS |
7 | | - |
8 | | -sms = SMS("API_KEY", "API_SECRET", "SERVICE_ID") |
9 | | - |
10 | | -response = sms.verify_code(request={"code": "XXXXXXX", "number": "XXXXX"}) |
11 | | -``` |
12 | | - |
13 | | -### Pobieranie listy usług |
14 | | -```python |
15 | | -from payments.sms import SMS |
16 | | - |
17 | | -sms = SMS("API_KEY", "API_SECRET", "SERVICE_ID") |
18 | | - |
19 | | -response = sms.get_service_list(request={}) |
20 | | -``` |
21 | | - |
22 | | -## SMS XML |
23 | | -```python |
24 | | -from payments.sms_xml import SMS_XML |
25 | | - |
26 | | -code = SMS_XML.generateCode() # Generate code |
27 | | -``` |
28 | | - |
29 | | -## Direct Billing |
30 | | -### Generowanie transakcji |
31 | | -```python |
32 | | -from payments.direct_billing import DirectBilling |
33 | | - |
34 | | -db = DirectBilling("API_KEY", "API_SECRET", True, "SERVICE_ID") # True stands for debug mode |
35 | | - |
36 | | -response = db.generate_transaction(api_key="XXXXXXXXXXXX",request={"control": "XXXXXX", "amount": 10.00}) # and others variables |
37 | | -``` |
38 | | - |
39 | | -### Pobieranie danych o transakcji |
40 | | -```python |
41 | | -from payments.direct_billing import DirectBilling |
42 | | - |
43 | | -db = DirectBilling("API_KEY", "API_SECRET", True, "SERVICE_ID") # True stands for debug mode |
44 | | - |
45 | | -response = db.get_transaction(request={"id": "TRANSACTION_ID"}) |
46 | | -``` |
47 | | - |
48 | | -### Pobieranie listy usług DCB |
49 | | -```python |
50 | | -from payments.direct_billing import DirectBilling |
51 | | - |
52 | | -db = DirectBilling("API_KEY", "API_SECRET", True, "SERVICE_ID") # True stands for debug mode |
53 | | - |
54 | | -response = db.get_services(request={}) |
55 | | -``` |
56 | | - |
57 | | -### Pobieranie maksymalnych kwot transakcji |
58 | | -```python |
59 | | -from payments.direct_billing import DirectBilling |
60 | | - |
61 | | -db = DirectBilling("API_KEY", "API_SECRET", True, "SERVICE_ID") # True stands for debug mode |
62 | | - |
63 | | -response = db.get_transaction_limits(request={}) |
64 | | -``` |
65 | | - |
66 | | -### Pobieranie prowizji dla usługi |
67 | | -```python |
68 | | -from payments.direct_billing import DirectBilling |
69 | | - |
70 | | -db = DirectBilling("API_KEY", "API_SECRET", True, "SERVICE_ID") # True stands for debug mode |
71 | | - |
72 | | -response = db.get_service_commission(request={}) |
73 | | -``` |
74 | | - |
75 | | -### Pobieranie adresów IP serwerów SimPay |
76 | | -```python |
77 | | -from payments.direct_billing import DirectBilling |
78 | | - |
79 | | -ips = DirectBilling.get_servers_ip() |
80 | | -``` |
81 | | - |
82 | | -### Obliczanie podpisu sign |
83 | | -```python |
84 | | -from payments.direct_billing import DirectBilling |
85 | | - |
86 | | -db = DirectBilling("API_KEY", "API_SECRET", True, "SERVICE_ID") # True stands for debug mode |
87 | | - |
88 | | -sign = db.sign(123, "status", "valuenet", "valuepartner", "control") |
89 | | -``` |
| 4 | +# Dokumentacja |
| 5 | +[Kliknij tutaj](https://docs.simpay.pl/python/?python#wstep) |
0 commit comments