Giter Site home page Giter Site logo

abhimskywalker / flask_paytm_checkout Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 4.0 18 KB

Integrate Paytm Checkout to your Python Flask website to provide a secure, PCI-compliant way to accept Debit/Credit card, Net-Banking, UPI and Paytm wallet payments from your customers.

License: MIT License

Python 82.88% HTML 17.12%

flask_paytm_checkout's People

Contributors

abhimskywalker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

flask_paytm_checkout's Issues

TypeError: Object type <class 'str'> cannot be passed to C code

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

AES key error

I have followed your steps and code, but getting this error.
ValueError: Incorrect AES key length (14 bytes)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.