Skip to content

Commit e3eacd3

Browse files
committed
Merge branch 'kkiapay-master'
2 parents 64d8267 + 8d0803d commit e3eacd3

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

kkiapay/core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,12 @@ def __init__(self, public_key, private_key, secret, sandbox=False):
3030
"X-PRIVATE-KEY": self.private_key,
3131
}
3232
self.url = self.SANDBOX_URL if self.sandbox else self.BASE_URL
33+
self.transaction_url = self.url + "/api/v1/transactions/status"
34+
self.revert_url = self.url + "/api/v1/transactions/revert"
35+
self.payout_url = self.url + "/merchant/payouts/schedule"
3336

3437
def verify_transaction(self, transaction_id):
35-
self.url += "/api/v1/transactions/status"
3638
payload = {"transactionId": transaction_id}
37-
3839
try:
3940
r = requests.post(self.url, data=payload, headers=self.headers)
4041
except requests.exceptions.ConnectionError:
@@ -48,9 +49,8 @@ def verify_transaction(self, transaction_id):
4849
)
4950

5051
def refund_transaction(self, transaction_id):
51-
self.url += "/api/v1/transactions/revert"
5252
payload = {"transactionId": transaction_id}
53-
53+
5454
try:
5555
r = requests.post(self.url, data=payload, headers=self.headers)
5656
except requests.exceptions.ConnectionError:

readme.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80,20 +80,20 @@ schedule_payout = k.setup_payout(algorithm = '2',
8080

8181
print(schedule_payout)
8282
#{
83-
# 'response':
83+
# 'response':
8484
# {
85-
# 'merchant': '5d34445784deb700073a0281',
86-
# 'meta_data': '',
87-
# 'algorithm': 'roof',
88-
# 'rate_frequency': '',
89-
# 'roof_amount': '10000',
90-
# 'active': True,
91-
# 'send_notification': True,
92-
# 'destination_type': 'MOBILE_MONEY',
93-
# 'destination': '22961000000',
94-
# 'job_name': '',
85+
# 'merchant': '5d34445784deb700073a0281',
86+
# 'meta_data': '',
87+
# 'algorithm': 'roof',
88+
# 'rate_frequency': '',
89+
# 'roof_amount': '10000',
90+
# 'active': True,
91+
# 'send_notification': True,
92+
# 'destination_type': 'MOBILE_MONEY',
93+
# 'destination': '22961000000',
94+
# 'job_name': '',
9595
# 'account': '5d34445784deb700073a0282'
96-
# },
96+
# },
9797
# 'status_code': 200
9898
#}
9999
```

0 commit comments

Comments
 (0)