Skip to content

Commit

Permalink
added option as an additional keyword argument to specify where on th…
Browse files Browse the repository at this point in the history
…e clients server to receive the json callback from the intermediary server.
  • Loading branch information
TralahM committed Oct 7, 2020
1 parent 26a59aa commit d05e551
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 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.0",
version="3.0.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
5 changes: 4 additions & 1 deletion tests/test_Vodacash_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def Vodacash_obj():
username="thirdpartyc2bw",
password="thirdpartyc2bw",
server_ip="64.225.75.98",
# server_ip="127.0.0.1",
b2c_code="15058",
c2b_code="8337",
c2b_command_id="InitTrans_oneForallC2B",
Expand Down Expand Up @@ -44,7 +45,9 @@ def test_vodacash_c2b_transaction(Vodacash_obj, printer):

def test_vodacash_b2c_transaction(Vodacash_obj, printer):
result = Vodacash_obj.b2c(
customer_msisdn="243814447581", amount="700", currency="CDF",
customer_msisdn="243814447581",
amount="700",
currency="CDF",
)
printer(result)
logger.debug(result)
Expand Down
4 changes: 4 additions & 0 deletions vodacash/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ def c2b(
Amount to transact
*Optional arguments*
client_callback_url: URL Where to receive json callback data.
currency:
The currency code default CDF
Expand Down Expand Up @@ -207,6 +208,7 @@ def c2b(
"serviceprovidercode": self.C2B_Number,
"token": str(self.token),
"callback_url": str(self.C2B_CB_URL),
"client_callback_url": kwargs.get("client_callback_url"),
"command_id": self.C2B_CommandID,
"callback_channel": self.Callback_Channel,
"currency": currency,
Expand All @@ -229,6 +231,7 @@ def b2c(self, customer_msisdn, amount, currency="CDF", *args, **kwargs):
amount:
Amount to transact
Optional arguments:
client_callback_url: URL Where to receive json callback data.
currency:
The currency code default CDF
Expand Down Expand Up @@ -268,6 +271,7 @@ def b2c(self, customer_msisdn, amount, currency="CDF", *args, **kwargs):
"shortcode": self.B2C_Number,
"token": str(self.token),
"callback_url": str(self.B2C_CB_URL),
"client_callback_url": kwargs.get("client_callback_url"),
"command_id": self.B2C_CommandID,
"callback_channel": self.Callback_Channel,
"serviceprovidername": self.ServiceProviderName,
Expand Down

0 comments on commit d05e551

Please sign in to comment.