Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LiqPay._make_signature() #22

Open
Sub50dp opened this issue Nov 21, 2023 · 2 comments
Open

LiqPay._make_signature() #22

Sub50dp opened this issue Nov 21, 2023 · 2 comments

Comments

@Sub50dp
Copy link

Sub50dp commented Nov 21, 2023

TypeError: LiqPay._make_signature() takes 3 positional arguments but 4 were given
liqpay3.py:

def _make_signature(self, private_key, data):     # 3 arguments
        str_to_sign = private_key + data + private_key
        sha1_hash = hashlib.sha1(str_to_sign.encode('utf-8')).digest()
        signature = base64.b64encode(sha1_hash).decode('ascii')
        return signature
def cnb_signature(self, params):
    params = self._prepare_params(params)

    data_to_sign = self.data_to_sign(params)
    return self._make_signature(self._private_key, data_to_sign, self._private_key)     # 4 arguments given
def _make_signature(self, *args):
    text = "".join(x for x in args)
    text = joined_fields.encode("utf-8")
    return base64.b64encode(hashlib.sha1(text).digest()).decode("ascii")

or

def cnb_signature(self, params):
    params = self._prepare_params(params)

    data_to_sign = self.data_to_sign(params)
    return self._make_signature(self._private_key, data_to_sign)     # 4 arguments given
@marblewater
Copy link

same issue, any updates?

@Sub50dp
Copy link
Author

Sub50dp commented Dec 31, 2023

pip install liqpay-sdk-python3
I am using this library
But I would like to use the official version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants