Skip to content

Commit 0044fb6

Browse files
Merge pull request #17 from cron-ooo/add-payment-with-binding
Update pay method to allow payments with bindings
2 parents 8e749c3 + e05c6a3 commit 0044fb6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sberbank/service.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ def pay(self, amount, preauth=False, **kwargs):
120120
page_view = kwargs.get('page_view', 'DESKTOP')
121121
details = kwargs.get('details', {})
122122
description = kwargs.get('description')
123+
binding_id = kwargs.get('binding_id', None)
123124
method = 'rest/register' if not preauth else 'rest/registerPreAuth'
124125

125126
if success_url is None:
@@ -157,6 +158,8 @@ def pay(self, amount, preauth=False, **kwargs):
157158
data.update({'clientId': client_id})
158159
if kwargs.get('description'):
159160
data.update({'description': description})
161+
if kwargs.get('binding_id'):
162+
data.update({'bindingId': binding_id})
160163

161164
response = self.execute_request(data, method, payment)
162165

0 commit comments

Comments
 (0)