File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff 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"
Original file line number Diff line number Diff 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.
You can’t perform that action at this time.
0 commit comments