Skip to content

Commit a7876bc

Browse files
Added license and requirements file
1 parent 6b0aa72 commit a7876bc

5 files changed

Lines changed: 53 additions & 8 deletions

File tree

.pypirc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
[distutils]
2-
index-servers =
3-
pypi
2+
index-servers = pypi
43
[pypi]
5-
repository=https://upload.pypi.org/legacy/
6-
4+
repository = https://upload.pypi.org/legacy/

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"python.pythonPath": "/Users/nithinkashyap/env/pypi/bin/python"
3+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 BrokenTusk Technologies Private Ltd
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

requirements.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
astroid==2.4.2
2+
autopep8==1.5.4
3+
certifi==2020.6.20
4+
cffi==1.14.2
5+
chardet==3.0.4
6+
cryptography==2.9.2
7+
idna==2.10
8+
isort==5.5.2
9+
jwt==1.0.0
10+
lazy-object-proxy==1.4.3
11+
mccabe==0.6.1
12+
pycodestyle==2.6.0
13+
pycparser==2.20
14+
pylint==2.6.0
15+
requests==2.24.0
16+
six==1.15.0
17+
toml==0.10.1
18+
urllib3==1.25.10
19+
wrapt==1.12.1

setu/deeplink.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,17 @@ def generate_link(self, amount, expiresInDays, payeeName, refId, exactness="EXAC
3232
}
3333

3434
if exactness == "EXACT_UP":
35-
payload["validationRules"] = {"amount": {"maximum": 0, "minimum": amount}}
35+
payload["validationRules"] = {
36+
"amount": {"maximum": 0, "minimum": amount}}
3637
elif exactness == "EXACT_DOWN":
37-
payload["validationRules"] = {"amount": {"maximum": amount, "minimum": 0}}
38+
payload["validationRules"] = {
39+
"amount": {"maximum": amount, "minimum": 0}}
3840

3941
headers = generate_setu_headers(
4042
self.schemeId, self.secret, self.productInstance
4143
)
42-
response = requests.post(self.url + path, json=payload, headers=headers)
44+
response = requests.post(
45+
self.url + path, json=payload, headers=headers)
4346
handle_setu_errors(response)
4447
data = response.json()
4548
self.platformBillID = data["data"]["platformBillID"]
@@ -70,7 +73,8 @@ def mock_payment(self, amount, upiId):
7073
headers = generate_setu_headers(
7174
self.schemeId, self.secret, self.productInstance
7275
)
73-
response = requests.post(self.url + path, json=payload, headers=headers)
76+
response = requests.post(
77+
self.url + path, json=payload, headers=headers)
7478
if response.status_code != 200:
7579
raise Exception("Failed to mock payment", )
7680
return "Mock success"

0 commit comments

Comments
 (0)