Skip to content

Commit

Permalink
add client_id to mobile_pay
Browse files Browse the repository at this point in the history
  • Loading branch information
madprogrammer committed Oct 26, 2018
1 parent ea897b2 commit 7315f93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion sberbank/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def _get_credentials(self, merchant_id):

def mobile_pay(self, amount, token, ip, **kwargs):
currency = self.merchant.get('currency', self.__default_currency_code)
client_id = kwargs.get('client_id')
details = kwargs.get('details', {})
fail_url = kwargs.get('fail_url', self.merchant.get('fail_url'))
success_url = kwargs.get('success_url', self.merchant.get('success_url'))
Expand All @@ -64,7 +65,7 @@ def mobile_pay(self, amount, token, ip, **kwargs):
raise TypeError(
"Wrong amount type, passed {} ({}) instead of decimal".format(amount, type(amount)))

payment = Payment(amount=amount, details={
payment = Payment(amount=amount, client_id=client_id, details={
'username': self.merchant.get("username"),
'currency': currency
})
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import setuptools

setuptools.setup(name='django-sberbank',
version='0.2.20',
version='0.2.21',
description='Django app for Sberbank payments',
url='http://github.com/madprogrammer/django-sberbank',
author='Sergey Anufrienko',
Expand Down

0 comments on commit 7315f93

Please sign in to comment.