Skip to main content

Prodamus hash verifier

Project description

Prodamus hash verifier (HMAC)

Generate and verify Prodamus hash.

https://help.prodamus.ru/payform/integracii/rest-api/instrukcii-dlya-samostoyatelnaya-integracii-servisov#kak-prinyat-uvedomlenie-ob-uspeshnoi-oplate

Installation

pip install prodamuspy

Usage

Init object:

prodamus = prodamuspy.PyProdamus(API_TOKEN)

Parse query string to a dictionary:

bodyDict = prodamus.parse(body)

Create signature:

checkSign = prodamus.sign(bodyDict)

Verify signature:

signIsGood = prodamus.verify(bodyDict, receivedSign)
if signIsGood:
    print("Signature is awesome")
else:
    print("Signature is incorrect")

Copyright

Copyright 2023 [Max Arnold, Daniil Nagikh], all rights reserved.

This software is released under the MIT License.

A huge thank to https://github.com/max-arnold

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prodamuspy-1.0.2.tar.gz (3.7 kB view details)

Uploaded Source

File details

Details for the file prodamuspy-1.0.2.tar.gz.

File metadata

  • Download URL: prodamuspy-1.0.2.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for prodamuspy-1.0.2.tar.gz
Algorithm Hash digest
SHA256 3feaa37457cbc2124ca47adc9be51b39eb5dd1d3ebf9dbbae52d4fdd27fdf85a
MD5 e098589ca50ce9738baef9d644f3f4db
BLAKE2b-256 56e80f9c90b7ef7b3a8ab00f16dc250db9065a218a289d1a5be08ce8ec391c5e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page