cashfree / cashfree-pg-sdk-python

cashfree-pg-sdk-python
Apache License 2.0
0 stars 3 forks source link

base64 issue in PGVerifyWebhookSignature #71

Open fad1105 opened 3 weeks ago

fad1105 commented 3 weeks ago

https://github.com/cashfree/cashfree-pg-sdk-python/blob/215bf7631d196d77cb90db28c2236df759cbd0ca/cashfree_pg/api_client.py#L321

base64 was not define in the file. due to this we are getting the error while verify the signature

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/lokal/Desktop/projects/gyani/venv/lib/python3.9/site-packages/cashfree_pg/api_client.py", line 321, in PGVerifyWebhookSignature
    generatedSignature = base64.b64encode(hmac.new(secretkey, message, digestmod=hashlib.sha256).digest())
NameError: name 'base64' is not defined
/Users/lokal/Desktop/projects/gyani/venv/lib/python3.9/site-packages/cashfree_pg/api_client.py changed, reloading.
INFO 2024-08-21 16:26:23,312 autoreload 8953 8321732416 /Users/lokal/Desktop/projects/gyani/venv/lib/python3.9/site-packages/cashfree_pg/api_client.py changed, reloading.
suhas-cashfree commented 3 weeks ago

Let me check and get back to you on this

suhas-cashfree commented 3 weeks ago

@fad1105 Can you try 4.2.4 and let us know if it works as expected