Skip to content

Commit

Permalink
new version
Browse files Browse the repository at this point in the history
  • Loading branch information
TralahM committed Dec 6, 2022
1 parent 8dd8aca commit 994157b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="vodacompay",
version="3.1.0",
version="3.1.1",
author="Tralah M Brian",
author_email="briantralah@gmail.com",
description="A library to interface with vodacom's Payment System using an intermediary server.",
Expand Down
7 changes: 3 additions & 4 deletions vodacash/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ def authenticate(self):
Vodacom UATG payment gateway.
"""
conn = requests.post(
self.LOGIN_URL, json={
"Username": self.Username, "Password": self.Password}
self.LOGIN_URL, json={"Username": self.Username, "Password": self.Password}
)
try:
result = json.loads(conn.content)
Expand Down Expand Up @@ -225,7 +224,7 @@ def c2b(
result = json.loads(result)
return result
except json.decoder.JSONDecodeError:
return {"error": "Payment Service Unavailable,try again later"}
return {"error": f"Payment Service Unavailable,try again later: {result}"}

def b2c(self, customer_msisdn, amount, currency="CDF", *args, **kwargs):
"""Handle b2c.
Expand Down Expand Up @@ -290,4 +289,4 @@ def b2c(self, customer_msisdn, amount, currency="CDF", *args, **kwargs):
# print(result)
return result
except json.decoder.JSONDecodeError:
return {"error": "Payment Service Unavailable,try again later"}
return {"error": f"Payment Service Unavailable,try again later: {result}"}

0 comments on commit 994157b

Please sign in to comment.