Skip to content

Commit f2365a0

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents ead0655 + 2513d90 commit f2365a0

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

kkiapay/core.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,13 @@ def refund_transaction(self, transaction_id):
3737
self.url += "/api/v1/transactions/revert"
3838
payload = {"transactionId": transaction_id}
3939
r = requests.post(self.url, data=payload, headers=self.headers)
40-
return r.text
40+
41+
return json.loads(
42+
r.text,
43+
object_hook=lambda d: namedtuple("KkiapayTransaction", d.keys())(
44+
*d.values()
45+
),
46+
)
4147

4248
def setup_payout(self, options):
4349
self.url += "/merchant/payouts/schedule"

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Here's the plan for what's coming:
5858

5959
- [x] Sandbox and Live environments
6060
- [x] Verify Transaction
61-
- [ ] Refund Transaction
61+
- [x] Refund Transaction - `Only available on Live`
6262
- [ ] Schedule Payout
6363
- [ ] Add better errors and exceptions handling
6464
- [ ] Add tests.

0 commit comments

Comments
 (0)