Skip to content

Commit ef198e7

Browse files
committed
Final fix for payment capture with split config
1 parent 4b88169 commit ef198e7

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

braspag_sdk/apps/payments/requests/update_sale.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ def execute(self, payment_id):
3434
if self.data:
3535
data = self.data
3636

37-
return self.send_request('PUT', uri, params=params, data=data)
37+
return self.send_request('PUT', uri, data, params)

braspag_sdk/apps/split/data/split_payment.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from typing import List
2+
13
from braspag_sdk.utils import ObjectJSON
24

35

@@ -14,3 +16,10 @@ def __init__(self, subordinate_merchant_id, amount, mdr=None, fee=None):
1416
self.subordinate_merchant_id = subordinate_merchant_id
1517
self.amount = amount
1618
self.fares = SplitPaymentFares(mdr, fee)
19+
20+
21+
class SplitPaymentsCapture(ObjectJSON):
22+
""" Data model for when capturing payment with a split. """
23+
24+
def __init__(self, split_payments: List[SplitPayment]):
25+
self.split_payments = split_payments

0 commit comments

Comments
 (0)