payme-pkg 3.0.14b0__tar.gz → 3.0.15__tar.gz
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 payme-pkg might be problematic. Click here for more details.
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/PKG-INFO +29 -1
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/README.md +28 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme/classes/initializer.py +23 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme/exceptions/general.py +9 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme_pkg.egg-info/PKG-INFO +29 -1
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/setup.py +1 -1
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/LICENSE.txt +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme/__init__.py +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme/admin.py +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme/apps.py +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme/classes/__init__.py +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme/classes/cards.py +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme/classes/client.py +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme/classes/http.py +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme/classes/receipts.py +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme/const.py +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme/exceptions/__init__.py +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme/exceptions/webhook.py +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme/migrations/__init__.py +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme/models.py +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme/types/__init__.py +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme/types/request/__init__.py +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme/types/response/__init__.py +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme/types/response/cards.py +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme/types/response/receipts.py +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme/types/response/webhook.py +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme/urls.py +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme/util.py +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme/views.py +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme_pkg.egg-info/SOURCES.txt +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme_pkg.egg-info/dependency_links.txt +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme_pkg.egg-info/requires.txt +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/payme_pkg.egg-info/top_level.txt +0 -0
- {payme_pkg-3.0.14b0 → payme_pkg-3.0.15}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: payme-pkg
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.15
|
|
4
4
|
Home-page: https://github.com/Muhammadali-Akbarov/payme-pkg
|
|
5
5
|
Author: Muhammadali Akbarov
|
|
6
6
|
Author-email: muhammadali17abc@gmail.com
|
|
@@ -147,3 +147,31 @@ print(pay_link)
|
|
|
147
147
|
```
|
|
148
148
|
https://checkout.paycom.uz/bT15b3VyLXBheW1lLWlkO2FjLmlkPTEyMzQ1NjthPTUwMDAwMDtjPWh0dHBzOi8vZXhhbXBsZS5jb20=
|
|
149
149
|
```
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
## Generate Fallback Link
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
Example to generate fallback link:
|
|
156
|
+
|
|
157
|
+
- Input
|
|
158
|
+
|
|
159
|
+
```python
|
|
160
|
+
from payme import Payme
|
|
161
|
+
|
|
162
|
+
payme = Payme(payme_id="your-payme-id")
|
|
163
|
+
|
|
164
|
+
form_fields = {
|
|
165
|
+
"driver_id": 12345,
|
|
166
|
+
"amount": 1000
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
fallback_link = payme.initializer.generate_fallback_link(form_fields) # form field is optional
|
|
170
|
+
print(fallback_link)
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
- Output
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
https://payme.uz/fallback/merchant/?id=5feb5dd783c40aed047fe655&driver_id=12345&amount=1000
|
|
177
|
+
```
|
|
@@ -133,3 +133,31 @@ print(pay_link)
|
|
|
133
133
|
```
|
|
134
134
|
https://checkout.paycom.uz/bT15b3VyLXBheW1lLWlkO2FjLmlkPTEyMzQ1NjthPTUwMDAwMDtjPWh0dHBzOi8vZXhhbXBsZS5jb20=
|
|
135
135
|
```
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
## Generate Fallback Link
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
Example to generate fallback link:
|
|
142
|
+
|
|
143
|
+
- Input
|
|
144
|
+
|
|
145
|
+
```python
|
|
146
|
+
from payme import Payme
|
|
147
|
+
|
|
148
|
+
payme = Payme(payme_id="your-payme-id")
|
|
149
|
+
|
|
150
|
+
form_fields = {
|
|
151
|
+
"driver_id": 12345,
|
|
152
|
+
"amount": 1000
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
fallback_link = payme.initializer.generate_fallback_link(form_fields) # form field is optional
|
|
156
|
+
print(fallback_link)
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
- Output
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
https://payme.uz/fallback/merchant/?id=5feb5dd783c40aed047fe655&driver_id=12345&amount=1000
|
|
163
|
+
```
|
|
@@ -55,3 +55,26 @@ class Initializer:
|
|
|
55
55
|
)
|
|
56
56
|
params = base64.b64encode(params.encode("utf-8")).decode("utf-8")
|
|
57
57
|
return f"https://checkout.paycom.uz/{params}"
|
|
58
|
+
|
|
59
|
+
def generate_fallback_link(self, form_fields: dict = None):
|
|
60
|
+
"""
|
|
61
|
+
Generate a fallback URL for the Payme checkout.
|
|
62
|
+
|
|
63
|
+
Parameters
|
|
64
|
+
----------
|
|
65
|
+
fields : dict, optional
|
|
66
|
+
Additional query parameters to be appended to the fallback URL.
|
|
67
|
+
|
|
68
|
+
Returns
|
|
69
|
+
-------
|
|
70
|
+
str
|
|
71
|
+
A fallback URL formatted as a URL, ready to be used in the payment
|
|
72
|
+
process.
|
|
73
|
+
"""
|
|
74
|
+
result = f"https://payme.uz/fallback/merchant/?id={self.payme_id}"
|
|
75
|
+
|
|
76
|
+
if form_fields is not None:
|
|
77
|
+
for key, value in form_fields.items():
|
|
78
|
+
result += f"&{key}={value}"
|
|
79
|
+
|
|
80
|
+
return result
|
|
@@ -146,6 +146,14 @@ class InsufficientFundsError(CardError):
|
|
|
146
146
|
super().__init__(-31303, self.message, data)
|
|
147
147
|
|
|
148
148
|
|
|
149
|
+
class InsufficientFundsErrorV2(CardError):
|
|
150
|
+
"""Insufficient funds on the card."""
|
|
151
|
+
message = "Insufficient funds on the card."
|
|
152
|
+
|
|
153
|
+
def __init__(self, data=None):
|
|
154
|
+
super().__init__(-31630, self.message, data)
|
|
155
|
+
|
|
156
|
+
|
|
149
157
|
class InvalidCardNumberError(CardError):
|
|
150
158
|
"""Invalid card number provided."""
|
|
151
159
|
message = "Invalid card number."
|
|
@@ -254,6 +262,7 @@ errors_map = {
|
|
|
254
262
|
-31301: SmsNotConnectedError,
|
|
255
263
|
-31302: BalanceError,
|
|
256
264
|
-31303: InsufficientFundsError,
|
|
265
|
+
-31630: InsufficientFundsErrorV2,
|
|
257
266
|
-31300: InvalidCardNumberError,
|
|
258
267
|
-31002: ProcessingServerError,
|
|
259
268
|
-31110: OtpSendError,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: payme-pkg
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.15
|
|
4
4
|
Home-page: https://github.com/Muhammadali-Akbarov/payme-pkg
|
|
5
5
|
Author: Muhammadali Akbarov
|
|
6
6
|
Author-email: muhammadali17abc@gmail.com
|
|
@@ -147,3 +147,31 @@ print(pay_link)
|
|
|
147
147
|
```
|
|
148
148
|
https://checkout.paycom.uz/bT15b3VyLXBheW1lLWlkO2FjLmlkPTEyMzQ1NjthPTUwMDAwMDtjPWh0dHBzOi8vZXhhbXBsZS5jb20=
|
|
149
149
|
```
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
## Generate Fallback Link
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
Example to generate fallback link:
|
|
156
|
+
|
|
157
|
+
- Input
|
|
158
|
+
|
|
159
|
+
```python
|
|
160
|
+
from payme import Payme
|
|
161
|
+
|
|
162
|
+
payme = Payme(payme_id="your-payme-id")
|
|
163
|
+
|
|
164
|
+
form_fields = {
|
|
165
|
+
"driver_id": 12345,
|
|
166
|
+
"amount": 1000
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
fallback_link = payme.initializer.generate_fallback_link(form_fields) # form field is optional
|
|
170
|
+
print(fallback_link)
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
- Output
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
https://payme.uz/fallback/merchant/?id=5feb5dd783c40aed047fe655&driver_id=12345&amount=1000
|
|
177
|
+
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|