This is the issue I am facing.
Traceback (most recent call last):
File "C:\Python39\Lib\site-packages\flask\app.py", line 2464, in call
return self.wsgi_app(environ, start_response)
File "C:\Python39\Lib\site-packages\flask\app.py", line 2450, in wsgi_app
response = self.handle_exception(e)
File "C:\Python39\Lib\site-packages\flask\app.py", line 1867, in handle_exception
reraise(exc_type, exc_value, tb)
File "C:\Python39\Lib\site-packages\flask_compat.py", line 39, in reraise
raise value
File "C:\Python39\Lib\site-packages\flask\app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "C:\Python39\Lib\site-packages\flask\app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Python39\Lib\site-packages\flask\app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "C:\Python39\Lib\site-packages\flask_compat.py", line 39, in reraise
raise value
File "C:\Python39\Lib\site-packages\flask\app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Python39\Lib\site-packages\flask\app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "C:\Users\RK Mart\Desktop\flask_paytm_checkout\flask_paytm_checkout\app.py", line 48, in index
transaction_data["CHECKSUMHASH"] = generate_checksum(transaction_data, MERCHANT_KEY)
File "C:\Users\RK Mart\Desktop\flask_paytm_checkout\flask_paytm_checkout\paytm_checksum.py", line 22, in generate_checksum
return encode(hash_string, merchant_key, IV)
File "C:\Users\RK Mart\Desktop\flask_paytm_checkout\flask_paytm_checkout\paytm_checksum.py", line 102, in encode
c = AES.new(key, AES.MODE_CBC, iv)
File "C:\Python39\Lib\site-packages\Crypto\Cipher\AES.py", line 232, in new
return create_cipher(sys.modules[name], key, mode, *args, **kwargs)
File "C:\Python39\Lib\site-packages\Crypto\Cipher_init.py", line 79, in _create_cipher
return modes[mode](factory, **kwargs)
File "C:\Python39\Lib\site-packages\Crypto\Cipher_mode_cbc.py", line 274, in _create_cbc_cipher
cipher_state = factory._create_base_cipher(kwargs)
File "C:\Python39\Lib\site-packages\Crypto\Cipher\AES.py", line 103, in _create_base_cipher
result = start_operation(c_uint8_ptr(key),
File "C:\Python39\Lib\site-packages\Crypto\Util_raw_api.py", line 138, in c_uint8_ptr
raise TypeError("Object type %s cannot be passed to C code" % type(data))
TypeError: Object type <class 'str'> cannot be passed to C code